Jump to content

frontend editing: how to make text fields/areas editable when displayed from a page array?


ttbb
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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');
}

 

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...