4images Forum & Community
4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: EnglishRider on March 11, 2003, 09:15:07 PM
-
Hello,
I am trying to move the categories listing onto the left hand side of the page. This works fine for the first page, but they do not show up. However when I put the random images statement under it, that feature shows up fine on all pages. Am I missing a setting, or does anyone know how to change the code to allow the categories to be shown on all pages? Example here -> http://www.bridlepathdesigns.com/temp/photos/ ... works on that page, but won't show up on http://www.bridlepathdesigns.com/temp/photos/details.php?image_id=8 (excuse the mess, haven't finished editing all the pages). The category statement is in my header file.
-
in the main .php files witch u are having problem with (such as details.php, member.php, lightbox.php and so on) at the end find:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
add before:$categories = get_categories(0);
if (!$categories) {
$categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);
-
Perfect, thank you!
- Carole
-
in the main .php files witch u are having problem with (such as details.php, member.php, lightbox.php and so on) at the end find:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
add before:$categories = get_categories(0);
if (!$categories) {
$categories = $lang['no_categories'];
}
$site_template->register_vars("categories", $categories);
unset($categories);
By reading post
http://4homepages.de/forum/viewtopic.php?t=4582
I have tried and its working great on all pages apart of categories.php
When I put it everything get mixedup... like
{cat_name} will show same name for every category
{cat_description} same as above
Subcategory doesn't show at all instead show up again main categories
Is it any solution can be found?
Please help
Thank you
Matlex
-
By reading post
http://4homepages.de/forum/viewtopic.php?t=4582
I have tried and its working great on all pages apart of categories.php
When I put it everything get mixedup... like
{cat_name} will show same name for every category
{cat_description} same as above
Subcategory doesn't show at all instead show up again main categories
Is it any solution can be found?
Please help
Thank you
Matlex
Matlex
I have used this in categories.php:
//-----------------------------------------------------
//--- Show Main Categories ----------------------------
//-----------------------------------------------------
$main_categories = get_categories(0);
if (!$main_categories) {
$main_categories = $lang['no_categories'];
}
$site_template->register_vars("main_categories", $main_categories);
unset($main_categories);
basically I just "renamed" anything with "categories" to "main_categories" and placed {main_categories} in the template where I wanted it - works great AND still gives you any subcats....
Cheers
-
What??? nothing needs to be fixed.. i just want to add my category list on every page.. like details.php but it doesn't work .. :/
-
I know this is an old thread but I have this problem. I have changed all the .php pages as directed above and they work great, however, there is a problem with the category.php page as explained above. This below does not work.
Matlex
I have used this in categories.php:
//-----------------------------------------------------
//--- Show Main Categories ----------------------------
//-----------------------------------------------------
$main_categories = get_categories(0);
if (!$main_categories) {
$main_categories = $lang['no_categories'];
}
$site_template->register_vars("main_categories", $main_categories);
unset($main_categories);
basically I just "renamed" anything with "categories" to "main_categories" and placed {main_categories} in the template where I wanted it - works great AND still gives you any subcats....
Cheers
Unless I am missing something. Does anyone know how to change the categories.php page to show the categories and with the category links working correctly. Thanks
-
Okay okay. I found it. I didnt think I would get a reply on an old thread like this so I refined my search phrase and I found this which works perfectly
http://www.4homepages.de/forum/index.php?topic=23516.0
Just to clarify - you need to change your categories.html (or any other template) to categories_all
Thanks very much.
-
hi v@no,
works fine but i have one problem with this mod.
on categories and details the {cat_name} is always just the last category
from my category list.
example: i have three categories:- category1
- category2
- category3
the {cat_name} shows always category3 on categories and details pages
can you help me?
CroKing