Pages: [1] |
|
|
Author |
Topic: Update content in multiple pages? (Read 1909 times) |
jdas
Posts: 3
|
Afternoon ladies and gents,
I had a quick question before i buy.
I am currently in the stages of designing a website for my recruitment company. It is a startup and hence I havent got a huge amount to invest on a professional CMS / Databased website.
My question is: I have a "Latest Vacancies" content box on my home page which i will update regularly with new vacancies. Now i wish to include this "Latest Vacancies" content box on various other pages (8-10 pages at the moment).
I wanted to know if i could update ALL the pages which contain this content box at once? This would save me time and hassle of having to update all 8-10 pages individually each time i get a new vacancy. Is it possible to include a snippet on different pages with the same snippet name? So if i update my home page, it would automatically update all the other pages that contain a snippet with the same name?
I apologise in advance if this type of question has already been answered. Any help or guidance would be very appreciated.
Thank you,
Jason
|
|
|
|
admin
Forum Administrator
Posts: 3169
SnippetMaster Author
|
Hello,
Yes, and no.
You can do this easily using "server side include" for your files. For exampe, you can create all your website files such as "file1.php" and "file2.php", etc..
And then put this code inside that file where you want your vacancies to display:
<? php include("latest_vacancies.html"); ? >
So what happens is that when the browser "runs" your website files (file1.php, etc..) it will "include" the code from the latest_vacancies.html page.
And then you can easily edit the "latest_vacancies.html" page using SnippetMaster.
So this way, it will work exactly like you desire... I hope that makes sense?
|
|
|
|
jdas
Posts: 3
|
Hi,
Thank you for your prompt response.
Just to clarify:
If my latest vacancies were stored on a file called latest_vacancies.html, the latest_vacancies.html file would not be shown to the public right? as it will just contain text info about the new vacancies. However my home page and any other pages (index.php, other.php, other2.php etc) will use this php script: <? php include("latest_vacancies.html"); ?> to pull information from the latest_vacancies.html file and display them? Also does the latest_vacancies file have to be HTML? can it be a txt file? Or does it HAVE to be HTML so snippermaster can edit it?
As you have probably gussed, i am a php newbie
Thanks
|
|
|
|
admin
Forum Administrator
Posts: 3169
SnippetMaster Author
|
Hello,
Yes, you are exactly correct and understand how it works.
The latest_vacancies.html file could be anything.
whatever.txt
something_else.whatever_you_want
If you open it in the SnippetMaster editor, then it will be treated as an HTML coded file...
One note of caution, however:
If you open the "WHOLE FILE" for editing, then the editor is going to add the opening and closing HTML and HEAD tags to make the code compliant with xhtml standards.
So what you should do is actually make your vacancies.html file using Snippet Tags (wrap the html code in snippet tags), and then open the file using the SNIPPET mode. This way, the editor won't add the "missing" HEAD and BODY and HTML tags...
I hope that makes sense? Let me know if you get stuck with anything.
What I recommend is still using
|
|
|
|
jdas
Posts: 3
|
Yes! thats perfect it all makes sense!
Thank you so much for your help!!
|
|
|
|
|
Pages: [1]
|
|
|
|