Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3

Thread: How to

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    1
    Member #
    30955
    I need to create 10 plus pages (2 Col) that will have the same header, footer, and sidebar content. The only thing that will change is the main content. I want to be able update the sidebar for one page that will update on all the pages. How do I do that?

  2.  

  3. #2
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    There are many many ways to accomplish this. So the simple option is just to use php includes, which means you would separate out the header, sidebar, footer etc. into their own php files (header.php, sidebar.php, footer.php for example). Then have a page for each of your 10 pages, so you will have index.php then just have includes where you want these parts to appear.

    The other way could use a framework or templating system to achieve it, or even a CMS.
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)

  4. #3
    Junior Member George - How To Gurus's Avatar
    Join Date
    Feb 2012
    Posts
    7
    Member #
    30805
    Liked
    2 times
    Hi, one thing to keep in mind. Be careful of not loosing your search engine optimization. You will need separate pages for each content use. As stated above one way is to have separate pages for the distinct content and then use PHP includes for the repeating elements. So I agree with the above. Also if you want to go the template route Dreamweaver has a pretty good one. I recommend against Frames as those are being dropped in HTML 5 (should have been dropped a long time ago).

    One more thought on multiple pages, if you set up category pages and then sub-pages to those pages it can improve your Google look over time. Our site at howtogurus.com is set up this way, index page leading to category pages leading to sub-pages. Google indexes those category pages and then puts a nice box in their search results for our site that shows not just the index page but also links to the category pages. Makes us look larger than we are, but also makes our listing more useful for the searcher.

    Last thought, if I was creating a small site with only 10 pages or so I would just copy and paste the content to those 10 pages, usually faster unless you are planning on doing a lot of updates. But on a larger site than anything that can cut down on the work is the way to go. My rule of thumb is always to do whatever is fastest and easiest.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com