Finding Album title with api call?

dopesauce
dopesauce's picture

Joined: 2007-01-29
Posts: 51
Posted: Mon, 2007-02-12 15:04

Hey guys,

Starting work on a module/hack for displaying a banner at the top of my albums based on their title or ID number.

Looking for an api call to perform a basic if/else like:

If (pagetitle) = (flowers)
<show code>
Else
<no title>
End if

I can expand it from there with some conditional CASE statements, but the goal is to eventually integrate it into a banner handling module.

If one of you smart type folk can get a PHP hillbilly like me started, we'll be Best friends foreverz.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-02-12 15:27

so we're talking about smarty code since you want to do stuff in templates.

you can use {$theme.item.title}. e.g.
{if $theme.item.title == 'flowers'}
show your banner
{/if}

please take a look at existing .tpl files to get a feeling for smarty code and how to use {if} and other control statements.

--------------
Enter the Gallery 2 Theme Contest today!