Editing looping content in the admin console
Posted: Wed Mar 21, 2012 8:59 pm
Hi all,
I have my CMS MS up and running and so far it's working great. Big thanks to the dev team for this solid platform.
I have a task at hand that I can't quite figure out how to solve, so all help is appreciated. Here it goes:
I need to be able to edit a page with a variable number of repeating content sections, via the admin console.
Essentially I need a template that lays out a specified number of content sections ready for editing in the wysiwyg editor.
Its kind of hard to explain this, so sorry if I'm unclear.
The user of my site wants to be able to log in to the admin panel, go to the respective page, specify how many (identical) sections the page should contain, and then be presented with a wysiwyg box for each section.
I've done a bit of research on this without much luck. The best idea I've had so far is this:
Create an editable field on the page that contains the number of sections to produce. This field is hidden, i.e. only visible in the page edit mode in the admin panel, and not on the actual front-end page itself.
Then I figured I could have a php loop in the template that takes this number as input and creates that many repeating editable content sections. Makes sense? The unsolved challenge here is how to make it easy for a non-technical user to specify this number in the admin panel, and how to get it into the template.
I really hope my explanation attempts made sense. All help on how to solve this task are appreciated, I need to get this implemented asap.
My PHP skills are minimal but I am a programmer and will likely figure out any code samples etc., as long as they are logical.
Thanks in advance!
I have my CMS MS up and running and so far it's working great. Big thanks to the dev team for this solid platform.
I have a task at hand that I can't quite figure out how to solve, so all help is appreciated. Here it goes:
I need to be able to edit a page with a variable number of repeating content sections, via the admin console.
Essentially I need a template that lays out a specified number of content sections ready for editing in the wysiwyg editor.
Its kind of hard to explain this, so sorry if I'm unclear.
The user of my site wants to be able to log in to the admin panel, go to the respective page, specify how many (identical) sections the page should contain, and then be presented with a wysiwyg box for each section.
I've done a bit of research on this without much luck. The best idea I've had so far is this:
Create an editable field on the page that contains the number of sections to produce. This field is hidden, i.e. only visible in the page edit mode in the admin panel, and not on the actual front-end page itself.
Then I figured I could have a php loop in the template that takes this number as input and creates that many repeating editable content sections. Makes sense? The unsolved challenge here is how to make it easy for a non-technical user to specify this number in the admin panel, and how to get it into the template.
I really hope my explanation attempts made sense. All help on how to solve this task are appreciated, I need to get this implemented asap.
My PHP skills are minimal but I am a programmer and will likely figure out any code samples etc., as long as they are logical.
Thanks in advance!