Sorry, another question!
When I click on an item there is a filter for offer/wanted which applies depending on the item state which means that when I click on my next category that filter still applies. For example, I click on an advert called "Bicycle" which has a type of Offered under a category called "Household". I then decide I want to look at the category "Cars" - when I click on "Cars" it only shows items in "Cars" with type Offered whereas I want it to show all.
How can I modify the top menu so that when a category is selected it shows all adverts under that category regardless of whether they are wanted or offered?
Thanks
Jase
You need to open controller.php and disable the session from the type, you would see it's pretty easy
regards
Hi Chema,
I had tried that but that disabled the filter completely - all I want is that the top menu whcih is output by the script always goes to typeall rather than the current selected type. For example, I hard coded the link to the home page to be index.html?type=all. Is that possible for all the top menu links? I cant hard code them but can I edit the creation of the links in the script to ony use type=all but still leaving the filter in place for when someone is within a category?
Thanks
Jase
Hi Jase,index.html?type=all this will not work.
Try in controlller.php this:
if (cG("type")!="") {
$type=cG("type");
if (!is_numeric($type)) $type=getTypeNum($type);//if its not numeric we need to find the numeric value
}
and in menu.php function function generatePostType($currentCategory,$type){ //shows types in the right side
if (!isset($currentCategory)) $currentCategory="all";
if (FRIENDLY_URL){
$offerUrl="/".TYPE_OFFER_NAME."/$currentCategory";
$needUrl="/".TYPE_NEED_NAME."/$currentCategory";
if ($currentCategory!="all") $allUrl="/".u(T_CATEGORY)."/$currentCategory";
}
else {
$offerUrl="/?category=$currentCategory&type=".TYPE_OFFER_NAME;
$needUrl="/?category=$currentCategory&type=".TYPE_NEED_NAME;
if ($currentCategory!="all") $allUrl="/?category=$currentCategory";
}
if ($type==TYPE_OFFER&&isset($type)) echo "<b>".ucwords(TYPE_OFFER_NAME)."</b>";
else echo "".ucwords(TYPE_OFFER_NAME)."";
if ($type==TYPE_NEED&&isset($type)) echo SEPARATOR."<b>".ucwords(TYPE_NEED_NAME)."</b>";
else echo SEPARATOR."".ucwords(TYPE_NEED_NAME)."";
if (isset($type)) echo SEPARATOR."".T_ALL."";
else echo SEPARATOR."<b>".T_ALL."</b>";
}
let's see, is the new code for 1.6.1
Awesome, thank you once again - now works exactly as I would like it to.
welcome!
keep updated for 1.6.1 to come! ;)
This topic has been closed to new replies.