SnippetMaster Support Forums
Return to main website
 
September 24, 2014, 11:27:19 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 24, 2014, 11:27:19 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  Pre-Sales Questions  |  Topic: Update content in multiple pages? « previous next »
Pages: [1] Print
Author Topic: Update content in multiple pages?  (Read 1909 times)
jdas

Posts: 3


[-] Update content in multiple pages?
« on: May 15, 2012, 08:02:30 AM »

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
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Re: Update content in multiple pages?
« Reply #1 on: May 15, 2012, 08:11:36 AM »

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.  Smile

So this way, it will work exactly like you desire...  I hope that makes sense?



Report to moderator   Logged
jdas

Posts: 3


[-] Re: Update content in multiple pages?
« Reply #2 on: May 15, 2012, 08:29:53 AM »

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  Very Happy

Thanks
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Re: Update content in multiple pages?
« Reply #3 on: May 15, 2012, 08:40:34 AM »

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

Report to moderator   Logged
jdas

Posts: 3


[-] Re: Update content in multiple pages?
« Reply #4 on: May 15, 2012, 08:57:55 AM »

Yes! thats perfect it all makes sense!
Thank you so much for your help!!  Very Happy Very Happy
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  Pre-Sales Questions  |  Topic: Update content in multiple pages? « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!