best way to use menu - Post ID 124816

User 1997052 Photo


Registered User
85 posts

Hi,

I am building a site with CC 2010...

I still haven't understood how I can do a menu in a way that I can always change it...

do I have to replace the menu with "Replace" on every page if I add a new page?

are you working with includes?

what is the best way?

Thank you

Daniel
Daniel P.
Germany
the answer is 42
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Daniel,

In order to setup your menu so that you don't have to change it on every page all the time you will have to do 1 or 2 things. First to make it keep the same style (images, colors, sizes etc) you would want to have the CSS menu setup. This gives you full control over the style of your menu and with the wave of a few little code words you can set that style to each page and that way if you change the menu colors or images you do it in the CSS file and that will update each page of your site automatically then.

The other thing you can do is either use a PHP Include or a Server Side Include which takes a bit more explanation than I have the knowledge to pass on unfortunately. For the most part they are pieces of a puzzle in a sense. You would create separate files for your Menu, Footer, Sidebars or whatever other areas you want to be automatically done on every page. Then on your site pages you reference these files in the areas you want them to show up on the site and it will automatically read those files and input the information from them into your site.

Unfortunately I don't have the knowledge of how it's all setup, but there are a few here that do, and doing a search for Server Side Includes will get you lots of information on them. You can find lots of help and tutorials for many things including the PHP Includes on Fe Pixies forum site at:
http://www.pixieplots.co.nz/forum/viewforum.php?f=4
User 117361 Photo


Ambassador
6,076 posts

From what I understand Daniel does want to change the menu in every page.
I still haven't understood how I can do a menu in a way that I can always change it...


If that is the case, I would be more inclined to do a horizontal menu where the content always remains the same and then maybe an additional side vertical menu for areas of content within one aspect of the menu...
eg. in the horizontal menu I have the item heading "products" then in the vertical menu, when I am on the products main page, I have a list of each product.

Or, dulcis in fundo - I have one horizontal menu with all the dropdown sub-items which will never need to be changed and can remain constant throughout the site.
User 1997052 Photo


Registered User
85 posts

Hey Jo, Hey Janys,

thank you for your help.

Janys, sorry for being not clearer. What I mean is that say the site is done but now I want to add a menu item, is really the best solution to change the code on every page?

I bought a theme from CC and implemented am redoing a website http://homeofthinkandgrowrich.com with it. What if I want to add a menu item later?

can the CSS menu designer help me?

this is a really big question for me since a site or an article are created by me "on the go", meaning I change a lot...

So this menu thing is a big mystery to me

Thank you
Daniel
Daniel P.
Germany
the answer is 42
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Daniel,

Sounds like you're talking about just adding new buttons or selections to your menu? If that's the case you do exactly what you're already doing for changing your menu, just copy and paste one of the <li> </li> lines and just change the stuff in between to the new selection or if you just want to change what the selection is just change it. CSS menus are pretty easy to manage, and your menu is pretty much already CSS so you're all set to go for that. Styling will be done in the css file for it such as colors, font styles, sizes etc. and the only thing you need to do on your pages is change the text that you want to be on the menu itself as well as the link.

For example a selection of your menu is like this part representing your Products:

<li class="categories_link"><a href="#">Products</a>
<ul id="group_list">
<li><a href="#">Christy Whitman</a></li>
<li><a href="#">Quantum Mind</a></li>

<li><a href="#">Think Right Now!</a></li>
<li><a href="#">Self Improvement Books</a></li>
<li><a href="#">Theta</a></li>
<li><a href="#">EFT</a></li>
<li><a href="#">LifePath </a></li>
<li><a href="#">Abraham</a></li>

<li><a href="#">Quantum Techniques</a></li>
</ul>

Let's say you decide to no longer use the Quantum Mind section, you would just delete the line below completely:

<li><a href="#">Quantum Mind</a></li>

If you want to add a new section then just copy one of the lines and paste it in the location you want it in and then change the href location (where the #'s are at the moment that need links in them yet) and change the actual name of the selection and you're set to go. Very simple to keep it going.

Other than that, if you're wanting to do the menu in one page that updates all the site pages then you'd need to use includes.

If this is still not what you're after let us know :)
User 117361 Photo


Ambassador
6,076 posts

In that case, the answer is not with css as far as my knowledge goes.
The style sheets are literally for what they say - style. So you can change from red to blue to green with large or small fonts throughout your site - but the basic framework or structure will remain the same. So unless someone else has an idea on this, I would say that you keep a main page called "articles" or whatever, and within that page you just add in a list or menu of all your articles as they are added. A sort of site map for articles, so to speak. That way only the single "articles" page will need to be changed with the title of an additional piece that you write - but the style with the css would remain the same throughout.

As I say - other people with knowledge of different coding may have better suggestions.

oops... Jo Ann obviously writes quicker than I do!
User 133269 Photo


Registered User
2,900 posts

php includes is the easiest way I know.... :)
http://www.pixieplots.co.nz/forum/viewt … =4&t=3
:cool:
Have fun
~ Fe Pixie ~
User 1997052 Photo


Registered User
85 posts

HI,

thank you all... I went to Fe's great resource and got it done!! yippie!!

I use include and it works like charm...

Thank you all

Daniel
Daniel P.
Germany
the answer is 42
User 562592 Photo


Registered User
2,038 posts

I have an example on my website as to how to easily use a server side include.

www.innovatewebdevelopment.com/support.html

Enjoy.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 364143 Photo


Guest
5,410 posts

Nice. Even after he said he went to Fe's site and accomplished the task.
CoffeeCup... Yeah, they are the best!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.