Can you give a graphical/clearer explanation of what you're trying to achieve.
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.
Can you give a graphical/clearer explanation of what you're trying to achieve.
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:
![]()
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
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.
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.