linkitem module - customizing template - getting variables from buffered debug?
|
greendress
Joined: 2005-11-19
Posts: 3 |
Posted: Sun, 2005-11-20 02:48
|
|||
|
Here's my story: I have the linkitem module installed. What I'm after is to modify the album display so that albums I have linked are titled "Related Album: XXX". [ I am aware that I could manually edit every album link so the title actually is "Related Album: XXX", but the goal here is to NOT have to do anything one by one. I would actually greatly prefer if I could just modify the code so that when I create the link, it automatically populates the g_title field of the g2_Item table with "Related Album: XXX" right from the get-go, but I couldn't even find myself a starting point for trying that. Still, if anyone wants to tell me some way I can do that, you can just stop reading now and go right ahead! ;-) ] Anyhow, I've gathered that a good starting point might be my local (I've already got it in its own 'local' directory) album.tpl for my theme - specifically, I'm looking this section: Quote:
{if !empty($child.title)} What I'm thinking is that I could get something along the lines of (with the text in blue to be replaced with something real): {if $child.canContainChildren} So, I thought a good starting point would be to put gallery in buffered debug mode and see what kind of variables are available. http://codex.gallery2.org/index.php/Gallery2:Tpl_Reference says To see all variables available for a page: turn on buffered debug output in config.php and reload the page. A popup window will show available data; to reference a variable connect levels of indentation with ".", as shown above to connect "user" with "userName". So, I've turned it on. First off, I don't get a popup window (in either Firefox or Explorer), but the debug text appears on the same page, below the actual gallery display (took me a minute to realize what was going on, since I was waiting for a popup). But whatever, the real problem is that I just am not seeing the variables. Exactly what am I looking for? I'm attaching the text that I get on the album page in question. Could some kind soul point out the variables to me, if they're there? Or if they're not there... where are they? Thanks for any help anyone can provide!
|
||||
| Login or register to post comments |

Posts: 10640
Yeah, I just discovered that tonight. You're running either a nightly build or CVS version. A change made to main.php did this. It's probably a bug, I'm calling it a bug
Here's where the change that made the Smarty Debug popup go bye-bye happened: http://cvs.sourceforge.net/viewcvs.py/gallery/gallery2/main.php?r1=1.137&r2=1.138
I submitted a bug report here: http://sourceforge.net/tracker/index.php?func=detail&aid=1362038&group_id=7130&atid=107130
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here