Define pages within category

Ah no - all my pages are created in a database. I do not have them as individual pages as well.

I have a layout.tpl.php which is the design template, and then I include menu.tpl.php for the menu - that menu.tpl.php has different menus in it and they only show on the specific pages I set - but I am just fed up of having to add the PAGE_ID everytime I add a new page in the database.

Hence your menu.tpl.php should then contain some sql which generates the menu from your database - much as I posted in reply #4

Why don’t you post the make up of your tables and categories tables here and somone will help you to generate this menu on the fly. Use this sql statement:

DESCRIBE <your table name>

I do not need the menu created - I need the menu placed in the specific pages.

Well if you maintain a file like this:

menu.html


<ul>
<li>Home</li>
<li>Sausages</li>
<li>Bacon</li>
<li>Contact us</li>
</ul>

and then do this in your template


include 'menu.html' ;

Then you will only have to update one file when you add black pudding to your meat-based product pages.

If you have no physical files to create a directory-like menu from, and you don’t want to create it from your database you are left with maintaining a list, either straight html or as an array or in an ini file - but it will be some kind of hand-maintained list.

It’s ok - for now I will stick to what i’ve got lol! - thank you very much for your assistance though, much appreciated :slight_smile: