Data Structure Strategy

Permalink
I'm a newbie to concrete5. So far I managed to create a custom block and a custom theme; where I'm stuck though is when it comes to things that are beyond the block system.

Let me give you a simple example: the website should feature a team page (photo, name) and a subpage for each team member (photo, name, text, email, position). And on the contact page, the name/email of each member should be listed too. Now in the thinking I'm used to, there'd be a table with rows for each member, and I could create lists and pages out of that.

Now how would you approach that with concrete5? Create pages for each person and a "list block element" that gathers all the necessary data from the pages? Or is there some better approach (I hope so!)

There's also another problem here when it comes to multilingual site (I live in Switzerland – it's just a must unfortunately..): The client aka site editor should not have to edit such data at several places on the site. All he should do is add a new member somewhere and magically the rest is done for you by the cms. How would you achieve that?

sklaus
 
ryan replied on at Permalink Reply
ryan
So, you're on the right track with the team page and team member pages.

You'd create a page type team_member and set that page type up how you want it. Page types can use their own custom file (/page_types) or they can can be created in the dashboard.

You can also look into page attributes to store the meta-data for the team members.

To display your list, you'd use the page list block, and tell it to display pages of the type "team_member". You could then create a custom page list block template to that could display thumbnailed pictures or whatever you'd like.

Hope that gives you a bit more direction.
aeroclown replied on at Permalink Reply
aeroclown
Thats a great Idea ryan I hadn't thought about doing it that way, using a page type would certainly work, though I thought I would mention this in this thread.

Remo has a People Block, There is also a Modified version of his block in that thread now call office space third post down. Jgarcia has also published to the market place, though it might not be there a block for realestate listings that might also be modifiable for your purposes, though you would need to contact him, if you don't use page types as ryan suggested. Just some additional input on top of what has already been suggested.

http://www.concrete5.org/community/forums/customizing_c5/remo_-_sta...