Support Forums


Go Back   68 Classifieds Forums > Help & Support > v4.1 Questions & Support

Notices

 
LinkBack Thread Tools Display Modes
Old 05-31-2009, 02:23 PM   #1
Junior Member
 
Join Date: Apr 2009
Posts: 14
Rep Power: 2
redking is on a distinguished road
Default Show subcategories on homepage

I need to have subcategories shown on home page (like those in the picture)

__________________
68 Classifieds Developer @ v4.1.x + Nu Style Template
redking is offline   Reply With Quote
Old 05-31-2009, 03:17 PM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,128
Rep Power: 29
seymourjames has a spectacular aura about
Default

You will need to do a few things. First of all you will need to edit your home.tpl page to show the sub categories. Remove the comments <!- and --> from this line below
<!--{$data[td].subcats}-->


As you do not want to show decriptions under the categories you can comment the description out so it looks like this

<!--{$data[td].description}-->

Then you will need to change your category image for a dot. Finally and beyond the scope here, you will need to adjust your css style sheet to get exactly what you are asking for.
__________________
TemplateCodes.com
seymourjames is online now   Reply With Quote
Old 05-31-2009, 05:01 PM   #3
Senior Member
 
 
Join Date: Jan 2007
Posts: 370
Rep Power: 19
michael is a jewel in the rough
Default

In v4.1.3

Go to includes>classes>kernel>Categories.php and insert a <br /> at the end of lines 98 and 103 (in place of   ).

While you're there you might also like to increase your subcategory limit at line 92. The default is just 3.

Good luck.
__________________
M Michael
V4.1.3 Developer - 3 Column Default Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Old 07-17-2009, 09:10 AM   #4
Junior Member
 
Join Date: Jul 2009
Posts: 8
Rep Power: 0
Hey Me is on a distinguished road
Default

Quote:
Originally Posted by michael View Post
In v4.1.3

Go to includes>classes>kernel>Categories.php and insert a <br /> at the end of lines 98 and 103 (in place of   ).

While you're there you might also like to increase your subcategory limit at line 92. The default is just 3.

Good luck.
Hi, thanks I've just done that, but wondering how I could add <ul><li> instead of <br /> ?

The $limit=3 is in line 87 btw in my categories.php (4.1.4)
Hey Me is offline   Reply With Quote
Old 07-17-2009, 09:59 AM   #5
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 820
Rep Power: 21
bowers01 is on a distinguished road
Default

Hi,
I just did this on my site.
But it ends up looking like this http://everythingsfree.org/image//images/212850cats.jpg
Can anyone see an easy way to fix this?
Cheers
__________________
Nick Bowers
68c v4.09 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 07-17-2009, 10:15 AM   #6
Junior Member
 
Join Date: Jul 2009
Posts: 8
Rep Power: 0
Hey Me is on a distinguished road
Default

For the dots just remove "LANG_DOT_DOT_DOT." from Categories.php

Donno about those blank areas in tables.
Hey Me is offline   Reply With Quote
Old 07-17-2009, 10:32 AM   #7
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,587
Rep Power: 46
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

Quote:
Originally Posted by bowers01 View Post
Hi,
I just did this on my site.
But it ends up looking like this http://everythingsfree.org/image//images/212850cats.jpg
Can anyone see an easy way to fix this?
Cheers
The issue that you are seeing is that within the browse.tpl file the array data is being put into a table cell <td> with the parent category, then each subcategory. The nature of a data cell within a table is that it will always auto adjust the height to contain the data within it. In your picture you have a table with two columns and therefore when one <td> has several subcategories it will make the height larger and will leave white space in the adjacent <td> that does not have as many of the subcategories.

The only way that I know of to get around that is to rewrite the browse.tpl file to use CSS boxes to contain the data instead of a table. This will get complicated and you would have to be an advanced coder for smarty and CSS to accomplish this.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified)
Sandbox (v3.1.10, v4.0.9, 4.1.3)
Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 07-17-2009, 10:47 AM   #8
Senior Member
 
 
Join Date: Jan 2007
Posts: 370
Rep Power: 19
michael is a jewel in the rough
Default

Nick, the categories are stored in table cells so those gaps are unavoidable unless you rewrite that part of your page to use CSS instead.
__________________
M Michael
V4.1.3 Developer - 3 Column Default Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Old 07-17-2009, 10:49 AM   #9
Senior Member
 
 
Join Date: Jan 2007
Posts: 370
Rep Power: 19
michael is a jewel in the rough
Default

Seriously Mike, how the hell did you get your response in 15 minutes before mine! You weren't there when I started typing like 5 minutes ago!!
__________________
M Michael
V4.1.3 Developer - 3 Column Default Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Old 07-17-2009, 11:39 AM   #10
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,587
Rep Power: 46
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

Quote:
Originally Posted by michael View Post
Seriously Mike, how the hell did you get your response in 15 minutes before mine! You weren't there when I started typing like 5 minutes ago!!
I use "The Force"! You must not have the force or you would have felt my presence.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified)
Sandbox (v3.1.10, v4.0.9, 4.1.3)
Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show the number of listings in subcategories? AHTOXA Modules / Plugins / Modifications 12 06-01-2009 01:35 PM
SubCategories Unregistered Pre Sales Questions 2 09-29-2008 09:50 AM
how to display subcategories on homepage cedano v4 Questions & Support 5 06-28-2008 03:52 AM
Show 2nd level categories on homepage? Success v4 Questions & Support 8 06-11-2008 09:16 PM
Can't browse subcategories Bucketman v3.0 Questions & Support 2 04-04-2006 07:07 AM


All times are GMT -4. The time now is 03:10 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0