Search the Community
Showing results for tags 'grouping'.
So I am making a front-end dashboard for an internal project, and was curious if it is possible to match 2 pages together based on their title and retrieve the data. To make it more clear: I have two pages "Section A" and "Section B" that each has child pages with names (the specific person) with subpages for their services offered. Section A - John Doe (name=john-doe) - Service 1 - Service 2 - Service 3 - Jane Doe (name=jane-doe) - Service 1 - Service 2 - Service 3 Section B - John Doe (name=john-doe) - Service 4 - Service 5 - Service 6 - Jane Doe (name=jane-doe) - Service 4 - Service 5 - Service 6 What I would like to achieve on the front-end (if it is even possibile), is an output like: John Doe - Service 1 - Service 2 - Service 3 - Service 4 - Service 5 - Service 6 Jane Doe - Service 1 - Service 2 - Service 3 - Service 4 - Service 5 - Service 6 Thinking aloud: use a find to get all pages using the template "service user" and then foreaching through their children (and possibly getting a few field values as well) to output in the front end. The service templates used in the sections vary slightly in which fields they use. <?php $findUsers = $pages->find("template=service-a (and or) service-b,(some how match based on names)"); //if no match exists, output what is available ?> <ul> <?php foreach ($findUsers as $groupedUser): ?> <li><?php echo $groupedUser->title; ?></li> <li><?php echo $groupedUser->service_a_location; ?></li> <li><?php echo $groupedUser->service_a_body; ?></li> <li><?php echo $groupedUser->service_b_location; ?></li> <li><?php echo $groupedUser->service_b_phone; ?></li> <?php endforeach; ?> </ul> Sorry, it is just me thinking aloud, but I was not even sure if it is possible to group them together like that. I was going to have a page for each "section" only displaying that data, but I thought it would be nice to display them all together as an overview for the user.
Hi, another stupid question from a PW newbie. I'm working on a page which displays team members with some information (name, phone number, ...). For the person who edits these infos later i wanna make it as simple as possible to change the entries. I was trying to use the repeater field for some sort of grouping the infos for the several team members in the backend. This works like expected. But how to display the entries in the frontend? There i need the separate fields (name, number ...) to be able to do a formatting. Is there another way of grouping the fields in the backend, but access the individual fields for displaying in the frontend? Mario
First of all, I would like to thank you all for such great documentation and community. I have just started developing 5 days ago and I have completed some really difficult programming relatively easily. But, I do have a quick question. The site I am developing has an events listing that links to events that have a possibility of multiple dates. That was easy. But, now I have to create the schedule listing and the events could look like this: Monday, Nov. 3rd 10:00 am - Event 1 11:30 am - Event 2 Tuesday, Nov. 4th 12:00 am - Event 1 So, to achieve this, I create a repeater field for the event date and time. I created the functionality for the schedule and have the events sorted by date but if the event has multiple dates and times, I cannot figure out how to pull the second date and time out and then list the event again. I thought about doing a recursive function that traverses the page array and pull out each event and date/time, putting it into a new array, sorting it and then doing the schedule. But that just seems like overkill and I am little rusty with my PHP. Does someone have something like this or do I need to rethink this?
Edit: durr... I forgot fieldset tabs! http://processwire.com/talk/topic/1592-problem-with-fieldset/ Feel free to delete this post / thread altogether... ===================================================================== Is there a method or module to group a certain number of input fields in a template (backend, edit mode)? I have basically two input field categories - product features and product description. Both categories have 1-2 dozen input fields. Together with all the other fields, it can get messy in the backend, even if I reduce the input field width to 25%. Is there a way to a) move a bunch of input fields to dedicated tabs? or b) include those in a collapsible group that are closed by default? I thought that field groups were the tool to use for this, but I'm not sure if or how.