I want to change the way the Categories are layed out.
I can't find a block or anything in the template manager or via ftp.
All I can find is this: <%$category%>
I want to change the way the Categories are layed out.
I can't find a block or anything in the template manager or via ftp.
All I can find is this: <%$category%>
You can alter it via the settings for the theme, but if you want to do more, you have to really get in and hard code it in the category.class in the lib folder if i remember correctly,
It would be awesome if it could be redone to make it easier because everytime i want to update i have to redo it in that file... a block or something would be awesome
Cheers Ezy
Okay I've gone in and found /public_html/lib/category.class.php
However, when I make changes to it, nothing happens. I've checked the server version to make sure the updated file was uploaded, and that's fine.
I have even tried logging back into the admin to check category structure and upgrade category path in the hopes that it had something to do with it. No luck.
In category.class.php I changed it from:
class clsCategory {
var $table_name = "category";
var $link_table_name = "link";
var $number_of_columns = 2; // choose 1,2,3, and 4
var $number_of_subcats = 3;
var $default_image = "images/folder.gif";
var $show_image = true;
var $show_subcat = false;
var $show_description = false;
var $number_of_links_format = "";
var $cat_description_format = "";
var $cat_link_style = "";
var $subcat_link_style = "";
var $cat_cellspacing = 2;
var $cat_table_width = 400;
var $parent = 0;
var $separator = "::";
var $header = "";
var $image_path = "";
var $query = "";
var $type_of_list = "STANDART_LIST"; // STANDART_LIST
var $bold = true; // SEARCH RESULT
var $keywords = "";
var $bold_format = "<b><%keyword%></b>";
AND CHANGED IT TO:
class clsCategory {
var $table_name = "category";
var $link_table_name = "link";
var $number_of_columns = 1; // choose 1,2,3, and 4
var $number_of_subcats = 0;
var $default_image = "images/folder.gif";
var $show_image = false;
var $show_subcat = false;
var $show_description = false;
var $number_of_links_format = "";
var $cat_description_format = "";
var $cat_link_style = "";
var $subcat_link_style = "";
var $cat_cellspacing = 2;
var $cat_table_width = 198;
var $parent = 0;
var $separator = "::";
var $header = "";
var $image_path = "";
var $query = "";
var $type_of_list = "STANDART_LIST"; // STANDART_LIST
var $bold = true; // SEARCH RESULT
var $keywords = "";
var $bold_format = "<b><%keyword%></b>";
NOTE: Not only does it not show any visible changes, but the file originally said 3 subcats, and my categories clearly show 5 subcats each on the home page.
well, I can feel for you. I started with INDEXU and PHP four years ago. the var declarations at the beginning of a PHP class are just the defaults for that variable within that class. Many will acually be set (and thus overwritten) either in the Admin section or in the calling PHP file.
You may still need to change some functions in the class itself depending on what you want to do.
I can suggest that it is time to buy a PHP book, or several.![]()
.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
I opened a trouble ticket and got a great response. The best part is that setting.php is in the template so changes can be made via the web interface.
Below is the response made to your ticket.
==================================
Hi Tony,
Checkout the "category appearance" in the /themes/kosmos/setting.php
There you can change number of category column, font style, etc.
Best Regards,
Zubby