Album ID in module tpl in sideblock

iearn

Joined: 2006-12-20
Posts: 22
Posted: Tue, 2007-04-10 20:24

Hi,

I am using a custom built module which gets included in my sideblock (both album and photo). What I want to do is have an if statement in the sideblock tpl that only prints text when Album ID = #### . How do I reference the albumID in the tpl for this module? I can't seem to locate this.

I was hoping for something like: {if $albumId eq '1234'}Correct Album{/if}

Thanks in advance for your time and assistance.

thanks,
iEARN

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-04-10 23:04

{if $item.id == 1244}
correct album
{/if}

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
iearn

Joined: 2006-12-20
Posts: 22
Posted: Wed, 2007-04-11 00:06

Hi,

Thanks for your prompt reply. I tried the code you mentioned but have been unable to get it to work. I tried putting it in several different locations:

1. In my album's theme directory: Sidebar.tpl, photo.tpl, and album.tpl
2. modules/OurCustomModuleDir/templates/blocks OurCustomModuleTemplate.tpl (names here are for example only)

Any clue what I might be doing wrong? Location #2 from above is where I need the code to go in the end. I need a way to have some code in the module side block change if the user is looking at a specific album or items within that album. Also, if I am looking at a photo would $item.id still be the album ID?

Any help that anyone could give is greatly appreciated.

thanks,
iEARN