adding additional argument to link for albums

kraej

Joined: 2011-06-28
Posts: 5
Posted: Tue, 2011-06-28 09:39

Hey there,

I am struggling a bit with this, maybe I am just blind ...

I need to add an additional argument/parameter to the link which calls the single subalbums. I played around in the album.tpl with these lines:

Quote:
{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
{assign var=frameType value="albumFrame"}
{capture assign=linkUrl}{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}{/capture}

but I could not add an argument.

What I need is, that I call the album and if there are no subalbums any more there is an additional parameter in the URL like "main.php/?g2_itemID=12345&parameter=true". For the moment I only have the g2_itemId in the URL...

Any suggestions?

Thanks so far,
Jochen

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2011-06-28 16:10
86 	{capture assign=linkUrl}{g->url arg1="view=core.ShowItem"
87 	arg2="itemId=`$child.id`" arg3="parameter=true"}{/capture} 

Should work.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kraej

Joined: 2011-06-28
Posts: 5
Posted: Wed, 2011-06-29 06:54

Thanks Dave,

I forgot to mention that I already tried that, but nothing happened.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-06-30 00:26

Works for me.
http://www.langleycom.com/gallery2/main.php
mouseover the test album and see:
http://www.langleycom.com/gallery2/main.php?g2_itemId=3050&g2_parameter=true

Cache?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kraej

Joined: 2011-06-28
Posts: 5
Posted: Thu, 2011-06-30 08:20

Hmm.. that's weird. I deleted the cache in the browser and did the tasks about template and database cache in the Site Admin Maintenance ... still no change :-/ Any idea what might be the problem?

Cheers!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-06-30 13:43

Are you editing the file that the theme is using?
Add some text for a test.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kraej

Joined: 2011-06-28
Posts: 5
Posted: Thu, 2011-06-30 13:55

Yes - it's the correct file. I tried

{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
<p>TEST</p>
{assign var=frameType value="albumFrame"}
{capture assign=linkUrl}{g->url arg1="view=core.ShowItem" 
arg2="itemId=`$child.id`" arg3="banner=true"}{/capture}

and it showed me a "TEST" above the thumbnails for the albums. The album itself did not show the "TEST", so I am looking at the right position actually ... I am totally lost :-/

Jochen

 
kraej

Joined: 2011-06-28
Posts: 5
Posted: Tue, 2011-07-05 06:43

any idea?

is it maybe because of the embed mode??

thanks for any help ;)

jochen