ttbb Posted September 1, 2022 Posted September 1, 2022 hi all, as far i've been getting familiar with PW up to now i learned about the frontend editing that i can edit text fields/areas easily on single pages. but how do i make this work when i'm displaying several pages with a listing template? let's say i have a news content type: when i use a template e.g. news.php to display one news article on a page, i get the frontend editing there active without problems on a listing page like a news archive with a template e.g. new_list.php i collect some news pages with a page array and write the items field values into an array to later produce the output html. i tried to use the <edit> tag and the edit-attribute in a <div> in the output but with no avail. so where should i head to when i want to make e.g. all news article news_body fields on my listing page editable? any hints are greatly appreciated! thanks for listening!
bernhard Posted September 1, 2022 Posted September 1, 2022 Something like this (from the docs)? <edit field="events" page="1001"> ... </edit> PS: ALFRED can help with FrontendEditing: https://www.youtube.com/watch?v=7CoIj--u4ps&t=1714s PPS: I don't really get the problem... Shouldn't it just be something like this? foreach($page->children() as $child) { echo $child->edit('body'); } 1
ttbb Posted September 1, 2022 Author Posted September 1, 2022 thank you very much, @bernhard! this one did the trick ?? <edit field="events" page="1001"> ... </edit>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now