Support Forums

Moving categories section into left nav bar

This is a discussion on Moving categories section into left nav bar within the Templates, HTML, CSS, and Design Help forums, part of the General category; I have v4.1.6 Designer and using a modified version of the 'default' template. I am trying to move the "Browse ...


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

Reply
 
Thread Tools Display Modes
Old 11-03-2009, 07:34 PM   #1
Customer
 
Join Date: Nov 2009
Posts: 6
Rep Power: 0
taxicat is on a distinguished road
Default Moving categories section into left nav bar

I have v4.1.6 Designer and using a modified version of the 'default' template. I am trying to move the "Browse categories" section from the main body of the home page into the left hand nav column so that it will appear on every page. Now this works fine on the home page and displays correctly, but as soon as you go to any other page it no longer displays. Any ideas?
taxicat is offline   Reply With Quote
Old 11-03-2009, 07:46 PM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,342
Rep Power: 132
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

categories in 68C are dynamic and not static text. They are stored in a database and in turn have to be pulled from the database to be displayed. The home pages underlying php script does this and in turn the smarty vars are there for you to use off to the side.

However, not all pages need to display categories and in turn they are not pulled from the database and thus you cant display them because they dont exist on that page.

Your best bet would be to create a plugin to collect the categories and call that plugin on the layout.tpl template so it will be available on all pages.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 11-04-2009, 09:49 AM   #3
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 474
Rep Power: 31
michael is just really nice michael is just really nice
Default

Try this;

<h1>Main Categories</h1>
<div class="left-box">
<ul class="sidemenu">
{categories_parent}
{foreach from=$pcat item=entry}
<li>{$entry.link}</li>
{/foreach}
</ul>
</div>
__________________
M Michael
V4.2.1 Developer - Sigma 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 11-04-2009, 09:58 AM   #4
curmudgeon
 
Join Date: Mar 2006
Posts: 5,342
Rep Power: 132
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Good catch Michael, I forgot about that plugin.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 11-04-2009, 06:05 PM   #5
Customer
 
Join Date: Nov 2009
Posts: 6
Rep Power: 0
taxicat is on a distinguished road
Default Thank You

Lads, I do believe you are brilliant. Thanks for the code.
1 more thing - what do I add if I want to also have the category image included?

Last edited by taxicat; 11-04-2009 at 06:09 PM.
taxicat is offline   Reply With Quote
Old 11-14-2009, 01:50 PM   #6
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 474
Rep Power: 31
michael is just really nice michael is just really nice
Default

Hmmm. If it's the usual 'bullet point' image - - that's controlled by your CSS and should automatically appear as you are using an unordered list (I think).

If it's custom category images you're after the perhaps someone a bit more knowledgeable may be able to help.

Mike.
__________________
M Michael
V4.2.1 Developer - Sigma 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
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Translate categories in the left menu magicosta Technical Support 0 09-01-2009 07:10 PM
Moving to new hosting seymourjames Technical Support 3 09-10-2008 12:23 PM
How to display categories in the left column spark Modules / Plugins / Modifications 9 08-04-2008 03:41 AM
Moving servers Unregistered Pre Sales Questions 5 10-14-2006 08:32 PM


All times are GMT -4. The time now is 07:03 PM.


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