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 5 of 5
  1. #1
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    Hi all,

    I've been using snippets of PHP for a long time but never really coded in PHP.

    But I'm wondering what makes a site dynamic, or what is the best way to make a site dynamic.. I usually use includes for my footer and header and menus.. just want some expert advice on what I should do to make a site more dynamic and easier to modify after it's been built

    thanks

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,850
    Member #
    5580
    Liked
    728 times
    Kade ...

    For things that are common to every page, like you mentioned,
    header, footer, menu, etc. ... you're doing the correct thing by using
    includes.

    You'll notice that by using includes, the page you're doing becomes more
    and more "template-like". That's not a bad thing. It actually becomes
    a dynamic website when you're using that page (file) to render all of the other
    pages.

    The less pages you create, the better. So you're already on the dynamic track.

    Your next logical step is to use MySQL to create sections of content ... whether they're
    paragraphs, articles, whatever you want to call it. With an "admin page", you can add
    edit or delete each of the sections. Those sections are pulled out of the database and
    displayed on your "template-like" page (as I mentioned above) .... again, the dynamic way.


  4. #3
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    Quote Originally Posted by mlseim
    Kade ...

    For things that are common to every page, like you mentioned,
    header, footer, menu, etc. ... you're doing the correct thing by using
    includes.

    You'll notice that by using includes, the page you're doing becomes more
    and more "template-like". That's not a bad thing. It actually becomes
    a dynamic website when you're using that page (file) to render all of the other
    pages.

    The less pages you create, the better. So you're already on the dynamic track.

    Your next logical step is to use MySQL to create sections of content ... whether they're
    paragraphs, articles, whatever you want to call it. With an "admin page", you can add
    edit or delete each of the sections. Those sections are pulled out of the database and
    displayed on your "template-like" page (as I mentioned above) .... again, the dynamic way.
    So would I end up with one index.php file that actually loads the different content from the database, based on the link they choose?

    Where does one start..?

    As you know, I'm very very familiar with CMS's - Joomla, drupal.. I have been everywhere in their database.

    But I still don't understand where I begin structuring a site like that...

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,850
    Member #
    5580
    Liked
    728 times
    There are many different levels of CMS.
    Joomla and Drupal are systems put together over years of coding by many people.

    Some systems use Smarty Templates:
    http://www.smarty.net/

    Smarty allows developers and designers to work on a site at the same time
    without stepping on each others' toes.

    It's really hard to answer "Where does one start..?"

    You'll probably be starting out somewhere ... like here?
    http://www.google.com/search?hl=en&q...&aq=f&oq=&aqi=

    When you create a website, decide how much of each page is common
    between all pages, and how much changes with each page. The stuff that
    changes will be "database" driven.


  6. #5
    Junior Member webwest's Avatar
    Join Date
    Sep 2009
    Location
    Los Angeles, CA
    Posts
    4
    Member #
    20015
    Just make sure every page on your site isn't index.php like yoursite.com/index.php?page=1 and yoursite.com/index.php?page=2

    Google will index the site better if the pages are named what they are - like about.php, contact.php etc. But using global includes is super and makes updating and creating pages a snap.


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 11:33 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com