Support Forums

Categories and subcats on home page

This is a discussion on Categories and subcats on home page within the Templates, HTML, CSS, and Design Help forums, part of the General category; I have 4.1.9 Designer and would like to include the categories AND their subcats on the home page. Is this ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 04-02-2010, 11:11 AM   #1
Customer
 
Join Date: Feb 2007
Posts: 69
Rep Power: 20
sbhkma is on a distinguished road
Default Categories and subcats on home page

I have 4.1.9 Designer and would like to include the categories AND their subcats on the home page. Is this possible? If so, how? Thanks!
sbhkma is offline   Reply With Quote
Old 04-02-2010, 11:22 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Show subcategories on homepage
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 04-02-2010, 11:54 AM   #3
Customer
 
Join Date: Feb 2007
Posts: 69
Rep Power: 20
sbhkma is on a distinguished road
Default

It seems this is for the developer version. I cannot edit the Go to includes>classes>kernel>Categories.php
sbhkma is offline   Reply With Quote
Old 04-02-2010, 12:08 PM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

In home.tpl just take of the comments around the subcats as shown below. You can do this in designer. Then you can use some css to style a bit more.

<td valign="top">
{if $data[td]<>""}
<img src="{$data[td].image}" border="0" alt="{$data[td].name}" /> {$data[td].start_link}<strong>{$data[td].name}</strong></a>
{if $data[td].total <> ''}
({$data[td].total})
{/if}
<br />
{$data[td].subcats}
{$data[td].description}<br />
{/if}
 
</td>
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline   Reply With Quote
Old 04-02-2010, 12:40 PM   #5
Customer
 
Join Date: Feb 2007
Posts: 69
Rep Power: 20
sbhkma is on a distinguished road
Default

I'm using the code below and it's just showing the main cats. What am I missing? (Using Templatecodes if that makes a difference here. Didn't think it would)

Code:
<br />
<table class="main" width="100%">
		<tr>
			<th>{$smarty.const.LANG_BROWSE_CATEGORY}</th>
		</tr>
		<tr>
			<td>		
		<table width="100%">
			{section name=tr loop=$data step=$cols}
				<tr>
					{section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols}
					<td valign="top">
					{if $data[td]<>""}
						{$data[td].start_link}<img src="{$data[td].image}" border="0" alt="{$data[td].name}" /></a> 
						{$data[td].start_link}<strong>{$data[td].name}</strong></a>
						{if $data[td].total <> ''}
						({$data[td].total})
						{/if}
						<br />
						<!--{$data[td].subcats}-->
						{$data[td].description}
					{/if}
					 
					</td>
					{/section}
				</tr>
			{/section}
			</table>
		</td>
	</tr>
</table>
sbhkma is offline   Reply With Quote
Old 04-02-2010, 12:56 PM   #6
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by sbhkma
I'm using the code below and it's just showing the main cats. What am I missing? (Using Templatecodes if that makes a difference here. Didn't think it would)
They arent diplaying because you havent followed the directions provided.

You have the smarty code to show subcats commented out.

<!--{$data[td].subcats}-->
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 04-02-2010, 01:11 PM   #7
Customer
 
Join Date: Feb 2007
Posts: 69
Rep Power: 20
sbhkma is on a distinguished road
Default

Actually, I got that part working. (I had copied the original code instead of my edit code. Sorry-been a very long week).
Just wondering now how to
Get it to not limit to 3
Create a line break for the sub cats
I have the designer version and can't edit categories.php
sbhkma is offline   Reply With Quote
Old 04-02-2010, 01:36 PM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by sbhkma
Actually, I got that part working. (I had copied the original code instead of my edit code. Sorry-been a very long week).
Just wondering now how to
Get it to not limit to 3
Create a line break for the sub cats
I have the designer version and can't edit categories.php
As stated in the links provided the limiting number of 3 is in one of the core PHP files so if you have the designer version these changes will be someything you are unlikely going to be able to make.

The alternative is to simply replace the smarty stuff in your home page template with a manually created and hard coded links to your categories.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 04-02-2010, 01:53 PM   #9
Customer
 
Join Date: Feb 2007
Posts: 69
Rep Power: 20
sbhkma is on a distinguished road
Default

Thanks. I guess I'll have to go that route then. Appreciate your guidance.
sbhkma is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Categories on Home page twinlover Technical Support 2 08-12-2009 07:57 PM
Limitited number of visable Categories on Home Page JP2 Designs Technical Support 4 05-28-2009 05:18 AM
sub categories on home page namibads Technical Support 0 04-02-2008 04:20 PM
Replacing the categories on home page with an image map.. margaretm Templates, HTML, CSS, and Design Help 1 08-07-2007 08:00 PM
Changing look of categories on home page Baz Templates, HTML, CSS, and Design Help 2 11-09-2006 01:29 PM


All times are GMT -4. The time now is 07:22 AM.


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