What method returns the complete path to an item? (Solved)

Brandon Sussman

Joined: 2005-10-24
Posts: 82
Posted: Fri, 2008-09-12 21:15

I am building a special block for images. It is almost complete.

I get my items using a purpose-built extension to the search module that chooses a random subset from a set of tagged (keywords) items. I am displaying thumbnails and descriptions for them.

What do I call to build the complete uri to access the item? All I have in the item itself is the pathComponent. <a href="{g->url arg1="view=core.ShowItem" arg2="itemId=$recentItem1.itemId"}"> almost does it - the link is missing the albumname part of the correct link.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6136
Posted: Fri, 2008-09-12 22:32

Sounds just like this.

Either way, it contains the methods you desire.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Brandon Sussman

Joined: 2005-10-24
Posts: 82
Posted: Sun, 2008-09-14 15:39

Thanks - looks like I can learn from or steal one of the functions - getPreferredLink - to do what is needed :)

Update: Yes, I stuck getPreferredLink() in myCallbacks.inc and it is working perfectly!