HOME | DOWNLOAD | SUPPORT | INSTALLATION | FAQ | SUPPORT FORUM | DEMO
 ° Forums ° Statistics ° Registration ° Search ° Manual °
SkaLinks Forum / General Discussions / News section
Author Message
kashyyyk
Member

Posted: 15 Feb 2006 11:52:46


I wanted to add announcements on my home page above the directory listings, but not have it appear on any other pages.

I got it to work and I wanted to share it with all of you since I have got a lot of help looking at all your posts.

I made a template called news.tpl, which I then uploaded into my templates folder then I added the following code into my header.tpl where I wanted it to appear-

{if $_output.categories}
{include file='news.tpl'}
{else}

{/if}

Dan

skalinks
Admin

Posted: 17 Feb 2006 05:19:16


Hello kashyyyk.


Thank you for your help. Nice job.

kashyyyk
Member

Posted: 21 Feb 2006 20:06:12


If I wanted to do what I did above, but for a specific catagory. How would I change {if $_output.categories}, say for catagory 1.

Thanks
Dan

skalinks
Admin

Posted: 22 Feb 2006 03:33:08


For category with ID=1 you need to do this:


{if $_output.categories.0.ID == 1}
{include file='news.tpl'}
{else}

Try it.

kashyyyk
Member

Posted: 22 Feb 2006 10:05:35


I did add the closing {/if}, but the news.tpl doesn't appear when I go to the catagory. I used catagory 22-

{if $_output.categories.0.ID == 22}
{include file='news.tpl'}
{else}
{/if}

I find the catagory number by going into admin and clicking the edit link for the catagory and get-
edit_cat.php?id=22&cat=0
Is this the correct number I should use?

Dan

treasure


Posted: 3 Mar 2006 05:56:00


Any resolution to this thread?

kashyyyk
Member

Posted: 3 Mar 2006 18:00:14


None, haven't seen a post from skalinks in a while

skalinks
Admin

Posted: 13 Mar 2006 21:35:31


Hello treasure and kashyyyk
Sorry for long response.

Try to add this code
{if $_output.categories.0.Parent == 22}
{include file='news.tpl'}
{else}
{/if}


Thank you!

kashyyyk
Member

Posted: 14 Mar 2006 09:19:30


It still didn't appear.

skalinks
Admin

Posted: 15 Mar 2006 05:51:42


Whould you send us your attributes to connect to your site via ftp. I will try to fix it.
My email: admin@skalinks.com

Thank you!

kashyyyk
Member

Posted: 15 Mar 2006 09:26:48


I've sent you an email

kashyyyk
Member

Posted: 16 Mar 2006 10:29:06


I got it work-
Use this, and whatever you have between the ifs will appear only when the catagory you specify is on the screen

{if $cat_navigation.title == CATAGORY NAME}


{/if}

Put your catagories name where I have put CATAGORY NAME