Author Topic: How to show categories in custom template page?  (Read 4924 times)

0 Members and 1 Guest are viewing this topic.

Offline rbfabbri

  • Newbie
  • *
  • Posts: 27
    • View Profile
How to show categories in custom template page?
« on: September 26, 2008, 04:29:04 PM »
Hi

I'm using in my gallery a sidebar menu that shows the categories.

The problem is that the categories are not displayed in my custom template pages (index.php?template=name)

There is some way to do this?

In the normal pages of the gallery i add "categories" => get_categories(0), in php files but how to do with the custom template pages?

Thanks!!!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How to show categories in custom template page?
« Reply #1 on: September 27, 2008, 01:36:59 AM »
you could try add in your custom template:
<?php
echo get_categories(0);
?>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rbfabbri

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: How to show categories in custom template page?
« Reply #2 on: September 29, 2008, 12:28:39 AM »
Didn't work V@no!  :?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: How to show categories in custom template page?
« Reply #3 on: September 29, 2008, 01:26:58 AM »
worked fine for me:


test.hml template:
Code: [Select]
{header}
<?php
echo get_categories(0);
?>

{footer}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rbfabbri

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: How to show categories in custom template page?
« Reply #4 on: September 29, 2008, 07:41:45 PM »
Thanks V@no!