linkitem link callback (code provided)

nicklous20

Joined: 2007-05-03
Posts: 5
Posted: Thu, 2007-06-28 22:57

I've added a Gallery2 LinkItem Callback that lets me check the link value from an album template (for example). I'm hoping you'll add it into your source base for the Link Item.

Here is a sample usage from my album.tpl file:

{if $child.entityType == 'GalleryLinkItem'}
{capture assign=linkItemUrl}{strip}{g->block type="linkitem.link" item=$child}{/strip}{/capture}
{/if}

Note that I haven't modified any of the original linkitem files... just added to them.

I've submitted this as an RFE:

http://sourceforge.net/tracker/index.php?func=detail&aid=1745087&group_id=7130&atid=357130

AttachmentSize
linkitem_changes.tar_.gz1.41 KB
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2007-07-14 23:24

this looks familiar, think I got it in email... I believe {$child.link} already has the same value retrieved by this code.

 
bigu_c
bigu_c's picture

Joined: 2007-10-28
Posts: 421
Posted: Sun, 2010-05-30 15:40

I'm using NZDI theme, but I don't know where I have to add:

Quote:
{if $child.entityType == 'GalleryLinkItem'}
{capture assign=linkItemUrl}{strip}{g->block type="linkitem.link" item=$child}{/strip}{/capture}
{/if}

in my themes/nzdi/templates/album.tpl ?

Please help.

Thanks.