Forums / Setup & design / dynamic menu / Comment17681

Author Topic

kracker

The Doctor

Tuesday 15 February 2005 7:58:01 pm

Comment17681

yas yas,

That seems like a fairly simple task.
What task you ask?
Including a static menu
Well, this is what we do ...

<i>These are abbreviated instructions (fyi)</i>, which require you to be at least familiar with some of the basics of how to use Exponential. If after reading this your still a little intimidated this set of flash video tutorials might help bring you up to speed.
http://ezpub.co.uk/tutorials/basic_design
http://ezpub.co.uk/tutorials/basic_design/1_look_and_feel

1. Using the Administrator, Create an override for the main page layout file " pagelayout.tpl "
** example url to page to do this: /index.php/visual/templateview/pagelayout.tpl
** Be sure to select "Copy of default template"

2. Edit the override template you have just created.

3. At this point you can simply drop the menu code (above) you wish to use where it best suites your needs.

4. (Optional) If your up for a small challenge, I would not put the menu code directly into your override, I would instead place an include line (below) to include the menu code into from a separate file to reduce clutter in the pagelayout.tpl file and maintain it's modularity and future maintainability.

* Include line:

{include uri="design:menus/static_header.tpl"}

This will require you to create a separate file to hold the menu code (example : menus/static_header.tpl).

* My example even goes a step further and places the menu file into a sub directory ( menus/ ). Sadly I only know how to do this step by connecting to to the server via ftp or ssh.

* Connect to your server and start by changing directories to /path/to/Exponential/design/(your site design name)/templates/

* Create a directory called menus/
* Open the newly created menus/ directory
* Create a new text file called static_header.tpl
* Paste your menu code into the file, save the file
* Clear your site's cache, you can do this via the administrator:
** example url to page to do this: /index.php/setup/cache (clear all cache)

Step 4 is a best practice technique, not a required step. Still those who use Exponential for a while begin to see rather quickly why little techniques like this are a very powerful methodology for creating clean, modular and flexible templates.

cheers,
//kracker
I'm not a player, I just talk **** a lot.

Korn : Shoots & Ladders
Kottonmouth Kings : Kings Blend
Bloodhound Gang: Fire Water Burn
http://www.deadtroll.com/video/helldeskcable.html

Member since: 2001.07.13 || http://ezpedia.se7enx.com/