daddyalfie Posted May 10, 2009 Report Posted May 10, 2009 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 Happy Mother's day to all authorized personnel. All others may have a feeling of gratitude as well! Alfie Quote
PicnicTutorials Posted May 10, 2009 Report Posted May 10, 2009 Hello, that sounds right to me. Here is my tut in includes also... http://www.visibilityinherit.com/code/php-includes.php Quote
daddyalfie Posted May 10, 2009 Author Report Posted May 10, 2009 Eric, thank you! I, and I am sure many others, will be studying that. Alfie Quote
jlhaslip Posted May 10, 2009 Report Posted May 10, 2009 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. Quote
PicnicTutorials Posted May 10, 2009 Report Posted May 10, 2009 (edited) 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 May 10, 2009 by Eric Quote
LSW Posted May 11, 2009 Report Posted May 11, 2009 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. Quote
daddyalfie Posted May 11, 2009 Author Report Posted May 11, 2009 (edited) 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! Thanks LSW for that clue about minimalization. Good advise! Thanks all! Alfie Edited May 11, 2009 by daddyalfie Quote
Recommended Posts
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.