Results 1 to 5 of 5

Thread: Changing Category Layout

  1. #1
    Join Date
    Oct 2006
    Posts
    10

    Unhappy Changing Category Layout

    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%>

  2. #2
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    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

  3. #3
    Join Date
    Oct 2006
    Posts
    10

    Default

    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.

  4. #4
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    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."

    .

  5. #5
    Join Date
    Oct 2006
    Posts
    10

    Exclamation Yay! Category Layout Solved

    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

Similar Threads

  1. Pagination - Page number layout
    By ezykiwi in forum Templates
    Replies: 9
    Last Post: 09-25-2006, 08:19 PM
  2. Changing appearance of category listing
    By norbert64 in forum Templates
    Replies: 6
    Last Post: 04-28-2006, 09:35 PM
  3. Changing basic layout,
    By shogun in forum Website development, hosting and promotion
    Replies: 3
    Last Post: 05-28-2004, 02:32 PM
  4. need to change layout of indexu
    By janewest in forum Tutorials, Hints & Tips
    Replies: 3
    Last Post: 05-13-2003, 10:03 PM
  5. changing the category look
    By jor71 in forum v5.x
    Replies: 1
    Last Post: 07-30-2002, 04:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •