Jump to content

Menu Crop


Guest

Recommended Posts

This is the site I am working on Ready 2 Go Speeches and on the home page he wants the menu to look at it does witch is hard coded into the skin. but on all other pages he wants to have a full list of all categories.

I have tried a few things with no luck. I was wondering if it was possible to have and if statement.

Like if your on the home page show my hard coded menu if not on the home page show the normal cube cart menu. If some one knows how to accomplish this I would appreciate it very much.

On another note I think this will help people who wants to add elements to the home page only like adding div layer and other style changes that will give your home page a deferent structure.

Link to comment
Share on other sites

Just FYI, speech is spelled incorrectly in "Get your speach now" above the search box. : )

Thanks I will get that fixed

I also will see what the other forums have to hold.

Link to comment
Share on other sites

Here is a solution, written on the fly. Untested in this case, backup your files before trying it.

First, open includes/boxes/categories.inc.php

Find this code:

// query database




Paste this code above it:




if(empty($_SERVER['QUERY_STRING'])) {



$box_content=new XTemplate ("skins/".$config['skinDir']."/styleTemplates/boxes/categories.tpl");

$box_content->parse("categories.static_menu");



} else {




Find this code near end of file:




$box_content->parse("categories");




Paste this above it:




}




Next, open skins/xx/styleTemplates/boxes/categories.tpl



Find this code:




<!-- BEGIN: categories -->




Below it, paste this code:




<!-- BEGIN: static_menu -->




Below that, paste the html for your static menu and remove it from global/index.tpl

Below your static menu html that you moved from index.tpl, paste this:




<!-- END: static_menu -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...