+ Reply to Thread
Results 1 to 8 of 8

Thread: Include a section of a webpage on other webpages

  1. #1
    Mole is offline Frontpage User Mole will become famous soon enough
    Join Date
    Nov 2009
    Location
    Galway
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Include a section of a webpage on other webpages

    I have used PHP includes, but my question is:

    Is there a way of including only a section/div from one page on other pages, so when adding new content, the user will only have to add info once on the original page?

    I will be adding Concrete5 CMS

    For example, the website I am designing (for a GAA club) has a Lotto Results page. I want to have it so, that the latest entry on the Lotto page, will appear in a div under the navigation on all other pages on the site. Thanks.

  2. #2
    php.allstar's Avatar
    php.allstar is offline Wannabe Geek php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute php.allstar has a reputation beyond repute
    Join Date
    Apr 2009
    Location
    Monamolin, Gorey, Co. Wexford
    Posts
    266
    Thanks
    1
    Thanked 1 Time in 1 Post

  3. #3
    Mole is offline Frontpage User Mole will become famous soon enough
    Join Date
    Nov 2009
    Location
    Galway
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is the Lotto page. It will be updated weekly. Number 1 is the latest entry.



    I need the latest entry from the Lotto page to appear in the navigation section of all the other pages like this image:


  4. #4
    louie's Avatar
    louie is offline Senior Member louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute louie has a reputation beyond repute
    Join Date
    Jan 2006
    Location
    Dublin, Ireland
    Posts
    2,407
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    And why include doesn't work for you?

    you should have the right section as an include already and all you have to do is include the lotto results into this section.

    the way I do things is:

    header - top of the page (includes all important parts [ functions, defined, connection, and everything that needs to be loaded before any other text])

    footer - bottom of the page (includes everything for cleaning up the code & tracking)

    left or right section - usually the navigation bar and news, etc

    then we have the centre where all the magic happens.

    #############
    so a template page will look like this

    include("header");
    include("left");
    include("centre");
    include("footer");

    so any changes I make to any of them will automatically be reflect it on the website.
    :. Web Design & Development Web Design Ireland
    :. Search Engines Optimization Search Engines Optimization
    :. Car Parts & Accessories Car Parts
    :. Cars Ireland Cars Ireland
    :. I Have 2 Find It Directory SEF Directory

  5. #5
    UTD Web is offline Frontpage User UTD Web will become famous soon enough
    Join Date
    Sep 2009
    Location
    Waterford
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Why not pull that bit of content from the database it's driven from and add it to a div that's positioned in that location on all pages?

    You could place this code in it's own include file and include it on the pages it is needed on in the position it's needed.

  6. #6
    Mole is offline Frontpage User Mole will become famous soon enough
    Join Date
    Nov 2009
    Location
    Galway
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by UTD Web View Post
    Why not pull that bit of content from the database it's driven from and add it to a div that's positioned in that location on all pages?

    You could place this code in it's own include file and include it on the pages it is needed on in the position it's needed.
    I'm sorry, but I'm lost. I haven't much PHP experience apart from using includes.

    I'm still in the early stages of building the site, I'm just looking ahead to do what I can to make the CMS as easy as possible for the user.

  7. #7
    UTD Web is offline Frontpage User UTD Web will become famous soon enough
    Join Date
    Sep 2009
    Location
    Waterford
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    oh right, have you experience with other languages because once you know one it's just a matter of syntax and PHP: Hypertext Preprocessor has everything you will ever need to know in there?

    Does the CMS you're using have the option to move little widgets around the design like wordpress does?

    Personally with specific designs like you outlined I would often opt for a simple bespoke CMS where the user can edit little sections and be brought to an edit area where an editor like Tiny or CK editor is invoked. This keeps it very simple for the end user. On this edit page a save button would post the data for insertion into a database or an update.

    [sorry had to remove code as this editor deletes variables even though the code was enclosed in php tags]
    Last edited by UTD Web; 10-03-2010 at 03:09 PM.

  8. #8
    Mole is offline Frontpage User Mole will become famous soon enough
    Join Date
    Nov 2009
    Location
    Galway
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by UTD Web View Post
    oh right, have you experience with other languages because once you know one it's just a matter of syntax and PHP: Hypertext Preprocessor has everything you will ever need to know in there?

    Does the CMS you're using have the option to move little widgets around the design like wordpress does?

    Personally with specific designs like you outlined I would often opt for a simple bespoke CMS where the user can edit little sections and be brought to an edit area where an editor like Tiny or CK editor is invoked. This keeps it very simple for the end user. On this edit page a save button would post the data for insertion into a database or an update.

    [sorry had to remove code as this editor deletes variables even though the code was enclosed in php tags]
    Thanks for your reply. I'm using Concrete5. It is very user friendly. It does allow the user to rearrange items on the page.

+ Reply to Thread

Similar Threads

  1. Archive RSS feed to webpage?
    By Mole in forum Coding Help
    Replies: 4
    Last Post: 18-01-2010, 11:05 AM
  2. Replies: 14
    Last Post: 15-05-2009, 03:03 PM
  3. Excel sheet to webpage
    By fobby in forum Coding Help
    Replies: 7
    Last Post: 04-09-2007, 09:05 AM
  4. wrong spellings on webpages
    By JoeBallantine in forum Webmaster Discussion
    Replies: 7
    Last Post: 18-08-2006, 08:22 AM
  5. What was your first site / webpage?
    By blacknight in forum General Chat
    Replies: 11
    Last Post: 16-08-2006, 12:02 AM

Visitors found this page by searching for:

No visitors have come to this page from a search engine, yet!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Optimization by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53