Results 1 to 9 of 9

Thread: Displaying subcategories on main page

  1. #1
    Join Date
    Sep 2005
    Location
    Poland - Warsaw
    Posts
    342

    Default Displaying subcategories on main page

    I'd like to display subcategories on main page (under main category) in a column not one by one separated by comma - how can I make it ? Where to look or change it ?

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    This is in category.class.php

  3. #3
    Join Date
    Sep 2005
    Location
    Poland - Warsaw
    Posts
    342

    Default

    Yes I know that - any details please ?

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I don't even use 5.x any more so I have to do exactly what you would need to do, search for it.

    line 572
    $category .= "<a href=\"$sub_url\" style=\"$this->subcat_link_style\" name=\"cat_$sub_id\">$sub_name</a>, ";

    change to

    $category .= "<a href=\"$sub_url\" style=\"$this->subcat_link_style\" name=\"cat_$sub_id\">$sub_name</a><br /> ";

  5. #5
    Join Date
    Sep 2005
    Location
    Poland - Warsaw
    Posts
    342

  6. #6
    Join Date
    Jun 2007
    Posts
    255

    Default

    how do you get some space between them?
    indexu unlimited license for sale pm me for more info
    Directories for sale pm me for more info

  7. #7
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Add another <br /> or a <p> or an &nbsp;

    However you want to do it.

  8. #8
    Join Date
    Jun 2007
    Posts
    255

    Default

    $sub_url = $site_url . "/" . $sub_url;

    $category .= "<a href=\"$sub_url\" style=\"$this->subcat_link_style\" name=\"cat_$sub_id\">$sub_name</a><br />";

    $j++;

    if ($j == $this->number_of_subcats || $result_sub->EOF) {
    $category = substr(trim($category), 0, -1);
    if ($j < $num_subs) {
    $category .= "....";

    where do i put it?
    indexu unlimited license for sale pm me for more info
    Directories for sale pm me for more info

  9. #9
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Really that's up to you, but you can try this

    $category .= "<a href=\"$sub_url\" style=\"$this->subcat_link_style\" name=\"cat_$sub_id\">$sub_name</a><br /><br />";

Similar Threads

  1. Displaying <%$categories%> on a custom page
    By echo@ in forum Blocks and Modification
    Replies: 1
    Last Post: 06-22-2008, 11:05 AM
  2. Replies: 0
    Last Post: 02-06-2008, 04:04 PM
  3. Replies: 13
    Last Post: 08-01-2005, 03:42 AM
  4. Links and subcategories on one page
    By bdewijs in forum v3.2
    Replies: 0
    Last Post: 11-07-2004, 12:36 PM
  5. subcategories displayed in main page
    By marko in forum v5.x
    Replies: 1
    Last Post: 10-17-2002, 06:43 PM

Posting Permissions

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