Results 1 to 5 of 5

Thread: Row.html templates

  1. #1
    Join Date
    Aug 2001
    Location
    Toronto, Ontario
    Posts
    678

    Default Row.html templates

    Is it possible to make different row.html templates for different categories?

    Just a general question.

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Hi Hart_House, you can do it by hacking the code.
    It's very simple. Just edit browse.php3 line 168
    Something like this:

    PHP Code:
        if($cat=10)        $rows_template "rows_10.html"
        
    ifelse($cat=14$rows_template "rows_14.html";
        
    ifelse($cat=42$rows_template "rows_42.html";
        else            
    $rows_template "rows.html";


          
    $rows .= EvalTemplate($template_path.$rows_template,
            
    "\$number,\$link_id,\$title,\$date,\$unique_name,\$category_path,".
            
    "\$description,\$hits,\$votes,\$rating,\$url,\$bid,".
                
    "\$new,\$hot,\$top_rated,\$pick,\$contact_name,\$email".$templ_fields);  
          
    $rows .= "\n"

  3. #3
    Join Date
    Aug 2001
    Location
    Toronto, Ontario
    Posts
    678

    Default

    do you also have to edit the browse.html file by any chance?

  4. #4
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    no need to edit browse.php3 and browse.html

  5. #5
    Join Date
    Aug 2001
    Location
    Toronto, Ontario
    Posts
    678

    Default

    Hey Dody,

    I changed the "ifelse" statement into "elseif" and it worked.

    I'm not sure why, the "ifelse" statement wasn't working.

    For everyone that's interested in this hack, you also have to edit your search.php3 file if you want the different rows.html templates to show up in a search.


    Last edited by Hart_House; 09-04-2001 at 06:29 AM.

Similar Threads

  1. Templates for sale
    By Veg in forum Templates
    Replies: 26
    Last Post: 08-09-2003, 08:41 AM
  2. Templates
    By richhead in forum v5.x
    Replies: 19
    Last Post: 07-07-2003, 02:53 AM
  3. NEW INDEXU THEME Templates
    By Hart_House in forum Templates
    Replies: 8
    Last Post: 02-27-2003, 07:36 PM
  4. NEW INDEXU THEME Templates
    By Hart_House in forum v5.x
    Replies: 8
    Last Post: 09-20-2002, 01:10 PM
  5. New Templates Question...
    By amanda in forum Templates
    Replies: 1
    Last Post: 02-05-2002, 02:27 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
  •