[SOLVED] Using Conditional Statements to display Cataloger Images in template?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
AngelEyes
Forum Members
Forum Members
Posts: 23
Joined: Tue Nov 20, 2007 3:42 pm

[SOLVED] Using Conditional Statements to display Cataloger Images in template?

Post by AngelEyes »

Hi,

I am using CMS Version 1.3 and .7 of Cataloger.

I am just starting to get my head round the basics of Smarty, just by trial and error really so go slow  ;D

I would like to display different images on different pages of the site and have used the following conditional statement which works fine:

Code: Select all

{if $page == 'whatever'}
<img src="/uploads/images/logging.jpg" alt="blahblah" title="blahblah" width="314" height="236" />
{else $page =='another'}
<img src="/uploads/images/consultation.jpg" alt="blahblah" title="blahblah" width="314" height="236" />
{/if}
What I would like to do is display the image assigned in a cataloger item pages as this would make the image selection automatic.

Using my idiot logic it should be something like this:

Code: Select all

<img src="{$image_1_url}" alt="blahblah" title="blahblah" width="314" height="236" />
However it seems you can't put cataloger tags in the template, perhaps I am missing some code? ... If anyone could shed some light I would be very happy.  ;D

Thanks.

Adam

PS. I suppose I would also need something to remove the IMG tag if the cataloger item page has no image...?
Last edited by AngelEyes on Wed Jul 16, 2008 11:21 am, edited 1 time in total.
cyberman

Re: Using Conditional Statements to display Cataloger Images in template?

Post by cyberman »

You can use the tag {get_template_vars} to see which variables are available in Smarty  ;).
AngelEyes
Forum Members
Forum Members
Posts: 23
Joined: Tue Nov 20, 2007 3:42 pm

Re: Using Conditional Statements to display Cataloger Images in template?

Post by AngelEyes »

You star  ;)

Code: Select all

<img src="{$src_image_1_url}" alt="" />
Does the trick just fine :)

Adam
Post Reply

Return to “Modules/Add-Ons”