Help: How to create a "back to album" button in photo view.

micatelodico

Joined: 2007-03-09
Posts: 2
Posted: Fri, 2007-03-09 22:45

Hy everybody.
I'm sorry if my question was already discussed, I try to search the forum, but without success.

How can I create a simple link called "back to album" inside the photo.tpl?
In other words, how can I create a button inside, over, under, somewhere near the photo I'm looking at that will bring the visitor back to the parent album?

I know this sounds like a really dummy task, but I cannot find a way out.

Note: I know that there are several way to get back to the parent album, I can use breadcrumbs, or DHTML links and so on. But this is not my target. I simply want a link/button in photo.tpl that bring me back to the parent album.tpl. Is it achievable?

Note(2): I try to study the templates that have such a function inside, but all them accomplish the task using javascrip functions. No way easier?

Thanks everybody,
Enrico

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25964
Posted: Sat, 2007-03-10 06:42
Quote:
How can I create a simple link called "back to album" inside the photo.tpl?

Add:
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$theme.item.parentId`"}">back to album</a>

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
micatelodico

Joined: 2007-03-09
Posts: 2
Posted: Sat, 2007-03-10 09:02

THX!
this sounds exactly what I was looking for.
I will test as soon as possible.
bye.