Search the Community
Showing results for tags 'parent_id'.
Hi guys, I'm struggling with the following situation: Structure: parent_page 01 (template01) --> shows teaser from child pages child-page 01 child-page 01 child-page 01 parent_page 02 (template01) --> shows teaser from child pages child-page 02 child-page 02 child-page 02 parent_page 03 (template02) --> shows teaser from child pages child-page 03 child-page 03 child-page 03 collect_page (template_collect) --> //This page shows teasers from all child pages In the template01 and 02 is a select options field (select_color) for 3 colors. The child pages gets the parent color by: $page->parent->select_color->title; Now I need the parent colors for all teasers on the collect_page. Something like: <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?> <?php if item is child page from parent with ID=1223 -> select_color->title : ?> <?php elseif item is child page from parent with ID=1224 -> select_color->title : ?> <?php elseif item is child page from parent with ID=1225 -> select_color->title : ?>
Sometimes I had to reset/ delete parent_id in settings of a PageTable field to force items be placed as children of the page being edited. I did this always by manipulating the database. Other way is to delete the field and create a new one. Both ways are not very comfortable. Is there a better way? Am I missing something? Would be nice to have this option from the field settings.
Hi folks, As the topic suggests... is there a way to add a parent_id to the dependency field? I managed to find this in the forums https://processwire.com/talk/topic/4323-field-dependencies/?p=56858 which seems to state that @ryan didn't understand why this didn't work. I need to show a field only if the parent_id=1032. Any thoughts?