{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title == 'Portfolio Links' AND $category_info.categoryid != '2'}
<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>
<a href="#">click here to go to our portfolio</a>
{else}
{if $item.title != "" }<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
{/if}
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}
If it works, try to spot the difference
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
It might work to move those two IFs into one IF, but the extra work isn't worth it
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I'd like to include more than one gallery. If I call all my pages 'gallery-something' is it possible to only take the first 7 letters of '$staticpage_pagetitle' so that it always returns 'gallery'?
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{$gallery = substr($staticpage_pagetitle, 0 , 7)}
{if $item.title == 'Portfolio Links' AND $sgallery == 'gallery'}<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>
<div class="serendipitySideBarContent">{$item.content}</div>
{elseif $item.title == 'Portfolio Links' AND $category_info.categoryid != '2' AND $gallery != 'gallery'}
<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>
<a href="#">click here to go to our portfolio</a>
{else}
{if $item.title != "" }<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
{/if}
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}
but it didn't work of course
Because I'm using this plugin more than once it would be really useful if it could be named (like the sidebar HTML nugget) for identification. Is this possible?
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title == 'Portfolio Links' AND $staticpage_pagetitle|truncate:7 == 'gall...'}<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>
<div class="serendipitySideBarContent">{$item.content}</div>
{elseif $item.title == 'Portfolio Links' AND $category_info.categoryid != '2' AND $staticpage_pagetitle|truncate:7 != 'gall...'}
<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>
<a href="#">click here to go to our portfolio</a>
{else}
{if $item.title != "" }<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
{/if}
</div>
thanks again
and just by the way do you know the answer to this
Because I'm using this plugin more than once it would be really useful if it could be named (like the sidebar HTML nugget) for identification. Is this possible?
and just by the way do you know the answer to this
Because I'm using this plugin more than once it would be really useful if it could be named (like the sidebar HTML nugget) for identification. Is this possible?
I was deliberately avoiding that question.
I know that, if you change the variable "stackable" to "true", you can install multiple copies of a plugin. But if it uses the database for its own settings, you might have multiple versions trying to access (and possibly modify) the same data.
As for adding a name to tell them apart, I'm not so sure. I think you'd need to add another introspection item for the "title". If I were doing it myself -- and I'd love to, but I'm really just too busy these days -- I'd look at the HTML nugget plugin to see how it's done.
Hi judebert
thanks for the reply. I'll give it a try myself - it can only go wrong so what the heck. I'll do what you suggest and take a look at the HTML nugget plugin. So I may be back with more questions
Having read up on Smarty modifiers my truncate now looks for gallery not gall... which I'm pleased about.