Loading...
 
Architecture / Installation

Architecture / Installation


Re: If statement with category

posts: 4656 Japan

> I want to have a dynamic content block displayed by tiki-show_page.tpl only for a particular Category. I tried
> {if $is_categorized eq 'y' and $parentId eq '2'}{content id=1}{/if} but that doesn't work.

This is the solution provided by luciash and toggg on #tikiwiki:

Copy to clipboard
{foreach name=u key=k item=i from=$catp}{if $k eq '2'}{content id=1}{/if}{/foreach}

So if the page's category is 2, then content id=1 is displayed. I have a group of pages that I want to have some not-editable-by-nonadmins content displayed at the top, and this does the job.

Thanks again to those two for the answer.

-- Gary - zukakakina.com



There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting