Support Forums

identify in which category user is in

This is a discussion on identify in which category user is in within the Templates, HTML, CSS, and Design Help forums, part of the General category; I am working to include menu bars on the left depending on the category customer is in. I am currently ...


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

Reply
 
Thread Tools Display Modes
Old 12-12-2009, 11:59 AM   #1
Customer
 
Join Date: Jun 2008
Location: Maldives
Posts: 134
Rep Power: 16
business is on a distinguished road
Default identify in which category user is in

I am working to include menu bars on the left depending on the category customer is in. I am currently using the following code to evaluate the location. This works ok for now.

Code:
{if $categoryid=="15" || $section=="15" || $smarty.server.REQUEST_URI|substr:0:26=="/searchresults.php?type=15"}
{include file="cat15submenu.tpl"}
{/if}
But the third criteria I used to check in which category customer is during a search result may not work in some instances. If there is search text entered, the logic would not be correctly evaluated. I used {debug} to check if the category variable is available (when searched for a specific category), but it is not.

based on the search URL, is there a better way to check for the category.
or, can we make the category id available (where a specific category is selected) in the showlisting.tpl
thanks for any help
__________________
v 4.2.0 Developer - Default Template
business is offline   Reply With Quote
Old 12-12-2009, 12:54 PM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

I think the category ID is given by $smarty.get.type for the search results page. It was so in version 4.09 .
__________________
"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 12-12-2009, 01:35 PM   #3
Customer
 
Join Date: Jun 2008
Location: Maldives
Posts: 134
Rep Power: 16
business is on a distinguished road
Default

thanks a lot. it is there.
__________________
v 4.2.0 Developer - Default Template
business is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
user info for logged in user business Technical Support 2 10-27-2009 01:45 PM
Can user create category? tom11011 Customizations 2 10-12-2009 08:00 PM
Modifying User Account requires user to re-enter Email Address nagrap2 Technical Support 2 02-16-2009 10:45 AM
User Create/Add Category Unregistered Pre Sales Questions 1 06-15-2007 11:26 AM


All times are GMT -4. The time now is 09:55 AM.


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