dynamic pages
Permalink
I manage a website that is being converted to Concrete5. The site relies heavily on classic ASP and databases. Since it's moving to C5, I'm looking to rewrite some of the pages (tools) in PHP. These pages will use a database on the backend. I'm having trouble figuring out how to run PHP since I know next to nothing about C5.
I did find mention of PHP Execute but am not sure if that lets me paste code on the page or if you create the code in a separate file and link it on the page. Either way, as long as my tools can be rewritten to function in C5, I will be happy.
Additionally, I'd like to be able to make my pages dynamic by displaying varying content based upon the server date. I do this often to avoid having to update the site on the weekends when I'm not in the office.
By the way, Even though I am the webmaster who runs the current site, I've not been included as part of the redesign team. I'm not even sure that C5 is the right tool for the site, but far be it for me to give my input regarding the new site I will be managing. At present, I know next to nothing about C5, so if I'm heading in the wrong direction, let me know.
I did find mention of PHP Execute but am not sure if that lets me paste code on the page or if you create the code in a separate file and link it on the page. Either way, as long as my tools can be rewritten to function in C5, I will be happy.
Additionally, I'd like to be able to make my pages dynamic by displaying varying content based upon the server date. I do this often to avoid having to update the site on the weekends when I'm not in the office.
By the way, Even though I am the webmaster who runs the current site, I've not been included as part of the redesign team. I'm not even sure that C5 is the right tool for the site, but far be it for me to give my input regarding the new site I will be managing. At present, I know next to nothing about C5, so if I'm heading in the wrong direction, let me know.
For the date based content, you can add pages and schedule their publication for a future date.
Scheduling future versions of a page to publish on specific dates seems like a pain.
Let's say that I have an events page on my site. I add 5 events and then schedule 5 versions of the site to publish as the events end unlisting the events as they occur. What happens if after the 2nd version publishes, I need to add some new events? what happens to the already scheduled versions of the page since I have branched after version 2? Do I need to unscheduled the original future versions from publishing and schedule new future versions? This seems like a lot of work.
wouldn't it make more sense to simply add some server side code to the page and have one version that is live all the time?
what I'm trying to figure out is how to do that in the easiest way possible and from what I'm learning, I may have to create those pages as single pages that I can add custom PHP to.
Let's say that I have an events page on my site. I add 5 events and then schedule 5 versions of the site to publish as the events end unlisting the events as they occur. What happens if after the 2nd version publishes, I need to add some new events? what happens to the already scheduled versions of the page since I have branched after version 2? Do I need to unscheduled the original future versions from publishing and schedule new future versions? This seems like a lot of work.
wouldn't it make more sense to simply add some server side code to the page and have one version that is live all the time?
if (date < "6/6/2017" ){ show event ending on 6/6/2017 }
what I'm trying to figure out is how to do that in the easiest way possible and from what I'm learning, I may have to create those pages as single pages that I can add custom PHP to.
Up to you. There is always "more than one way to skin a cat".
I wouldn't have done it with versions. You could have the summary on a page that automatically lists event pages, then set event pages to publish on dates. To add an event, add a page and its publication date. To delete an event, delete a page. The summary page will automatically track what is published.
There are many variations, perhaps using date attributes or variations of blogs.
You could also have a custom table of events and a calendar to extract and list them.
I wouldn't have done it with versions. You could have the summary on a page that automatically lists event pages, then set event pages to publish on dates. To add an event, add a page and its publication date. To delete an event, delete a page. The summary page will automatically track what is published.
There are many variations, perhaps using date attributes or variations of blogs.
You could also have a custom table of events and a calendar to extract and list them.
Your own database will either need to be added to the c5 database after c5 has been installed, or kept entirely separate. The first option is usually better for performance and ease of integration.
If your data integration is simple, you may be able to adapt c5's built in forms system or one of the forms addons rather than build from scratch.