Datasets
Me again :)
It would be extremely useful to be able to create a
series of similar data objects. Could be used for FAQs,
testimonials, staff members, etc. Right now in my "Team" template
I've added person_1_name, person_1_bio,
person_2_name ... etc., which is a lot of work and not
very maintainable.
You could represent them in the admin similar to blogs; drill down into "Testimonials >" to see a list of all the testimonials and add more testimonials. Then all you need is a few simple template tags for retrieving datasets.
We did exactly this in a CMS I previously worked on -- we called
the datasets blurbs. You would create a blurb type
("Testimonials") and then add blurbs. Blurbs could be directly
attached to specific pages and then iterated in templates with
{{ page.blurbs.testimonials }} or retrieved and
iterated via template tags, ie:
{% get 7 testimonials %}{% get all testimonials %}{% get 3 random testimonials %}{% get 5 recent testimonials %}
Anyway, just a suggestion. We found it to be a far more useful (and powerful) feature than we originally foresaw.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Steve Smith on 13 May, 2010 03:17 PM
We DO plan to implement repeating data groups in template data. That said, what you're looking to do with person_1_name, etc., would be much more easily done by creating a 'team member' template with bio, photo, etc. and create subpages under 'Team' with each person. Then simply loop through them in the team template with {% for person in item.children %}
Make sense? We know this solution isn't the best in some scenarios, but it will get you by for now.
3 Posted by Kyle Fox on 13 May, 2010 04:21 PM
Awesome, thanks for the tip. Didn't realize that was possible. That will work perfectly fine.
4 Posted by John Nunemaker on 13 May, 2010 06:31 PM
Yeah, we actually do this quite often and find it a nice way to architect
your sites.
Kyle Fox closed this discussion on 25 Jun, 2011 05:05 PM.