Jump to content

includes - again


daddyalfie

Recommended Posts

I considered a private e-mail to Eric on this one, but decided the topic would be of sufficient interest to warrant a new topic

 

Check out Eric's answers to my original question here http://www.killersites.com/forums/topic/1314/includes/

 

I copied/pasted his No. 2 answer, and it works wonderfully! Question is why?

 

Also, as far as I can figure out, the only part that needs to be included in the "include" file is the #nav div and its associated tags. The "body" id is specific to each page. Yes?

 

Before you know it I shall be a php-whiz :D

 

Happy Mother's day to all authorized personnel. All others may have a feeling of gratitude as well!

 

Alfie

Link to comment
Share on other sites

Perhaps, to clarify the placement of the include statement, the Step #5 should show the
tags in the sample code???



Other than that, nice Tutorial.

 

Thanks! I guess it would be better to clarify. Although, I did mention that fact in step #3.

 

Step 3) With your cursor, highlight and cut out the
    and the
  • . Yes, leave the in place.

 

Moot point though, because I'm just going to remove the div all together and only use the "ul" in a future edit.

Edited by Eric
Link to comment
Share on other sites

Just remember to keep includes as simple as possible. For Navigation my rule is the least possible.

 

You should (IMHO) never include the UL/OL in the include either. You may wish a OL an global and a UL as footer for instance. You may want the footer to look different as the global Nav. So the ID, whether it be a DIV or the UL/OL should be hard coded on the HTML.

 

The include should be LI and nothing more. This way that LI list will take on the stylings of whatever it is inserted into. If it is in the Global nav it will look one way and another if found in the footer nav. This makes that include useful anywhere based on one include.

Link to comment
Share on other sites

Took me a while, but I have made it work!!!! The site involves a monthly "magazine", so you can see how I did not want to re-do all the menus in all the pages as months are added.

 

I used Eric's No. 2 example above.

 

I have yet to post it with a php include, but a short php experiment on his server worked great!

 

If the full-up site does not work properly I shall break my arm pointing a finger at you! :D

 

Thanks LSW for that clue about minimalization. Good advise!

 

Thanks all!

 

Alfie

Edited by daddyalfie
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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...