HTML block on multiple pages
With apologies for what is probably a pretty elementary question.
How do I include a block of html formatted text, containing links and formatting derived from an existing style sheet, on multiple pages such that when the text is changed, it only needs to be edited in one place. In fact, forget the html bit, how do I do the same for just a simple block of text?
I've spent hours trying to solve this. It's taught me a lot but NOT the provided me with the answer to the question
How do I include a block of html formatted text, containing links and formatting derived from an existing style sheet, on multiple pages such that when the text is changed, it only needs to be edited in one place. In fact, forget the html bit, how do I do the same for just a simple block of text?
I've spent hours trying to solve this. It's taught me a lot but NOT the provided me with the answer to the question
You would need to use "includes". There are various types, such as Server Side Includes (SSI), PHP includes and ASP.Net includes.
I strongly recommend Fe Pixies tutorial on PHP includes. It is very well written and will help you do exactly what you are asking.
"Time heals everything. Know who said that? My Latin teacher at barber college!"
- Floyd Lawson
Widoktadwat - "Plays Well With Others"
- Floyd Lawson
Widoktadwat - "Plays Well With Others"
And you find them here: http://www.pixieplots.co.nz/forum/viewforum.php?f=4
Ha en riktig god dag!
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Inger, Norway
My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com
Whoopie!
Thanks to Cary & LZ. A bit of concentrated research and it's working a treat.
Guess what caused me the most bother?
Whilst I gave the include file a .php extension, I had left the files containing the INCLUDE statement with an .html extension. I went through just about everything before renaming them with a .php extension and Bingo! Gave me a good grounding in the potential pit-falls though - paths, server config needing cgi enabled - that sort of thing though, so no complaints.
Couldn't find the Fe Pixie tutorial though. Any chance of a link?
Thanks to Cary & LZ. A bit of concentrated research and it's working a treat.
Guess what caused me the most bother?
Whilst I gave the include file a .php extension, I had left the files containing the INCLUDE statement with an .html extension. I went through just about everything before renaming them with a .php extension and Bingo! Gave me a good grounding in the potential pit-falls though - paths, server config needing cgi enabled - that sort of thing though, so no complaints.
Couldn't find the Fe Pixie tutorial though. Any chance of a link?
Sorry, Inger's post and mine must have crossed. Got them thanks.
Sorry, I had copied the link to paste in and forgot to do so. I was really tired when I posted.
"Time heals everything. Know who said that? My Latin teacher at barber college!"
- Floyd Lawson
Widoktadwat - "Plays Well With Others"
- Floyd Lawson
Widoktadwat - "Plays Well With Others"
I've really dived into php since posting my original question. It's a revelation and a major time-saver.
The only problem I have is that I cannot us CC Editor or a Browser to preview composite pages locally. Presumably I need to install some kind of php gizmo/interpreter/server locally?
Any pointers gratefully received.
The only problem I have is that I cannot us CC Editor or a Browser to preview composite pages locally. Presumably I need to install some kind of php gizmo/interpreter/server locally?
Any pointers gratefully received.
What you need is XAMPP. It lets you basically run a server on your desktop/laptop. You will be able to see how the php looks. A simpler method would be to set up a test area on your server and upload to that to test.
I used to have a folder called 'bobthebuilder' that I would dump things into to test. I haven't set that up on my new host yet. I would just have to go to zieglerwebdesign.com/bobthebuilder to see what I was testing. If I had more than one, I would just creste subfolders.
I used to have a folder called 'bobthebuilder' that I would dump things into to test. I haven't set that up on my new host yet. I would just have to go to zieglerwebdesign.com/bobthebuilder to see what I was testing. If I had more than one, I would just creste subfolders.
"Time heals everything. Know who said that? My Latin teacher at barber college!"
- Floyd Lawson
Widoktadwat - "Plays Well With Others"
- Floyd Lawson
Widoktadwat - "Plays Well With Others"
Thanks for the pointer LZ. I've got it going with a similar product called WAMP.
Is it possible to get it working such that the CC HTML Editor preview works too, rather than having to separately provide a 'LOCALHOST' address in the browser?
Is it possible to get it working such that the CC HTML Editor preview works too, rather than having to separately provide a 'LOCALHOST' address in the browser?
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.