Iāve ran into quite a challenge for me. I have user profiles on my site, generated by a template via a route, and each user profile has posts on it. The posts come in snippets, with page names like āuser/post-nameā. Each post snippet has an āEditā button to change the post text.
Iām stuck at figuring out how to handle the post editing. When the āEditā link (or in my case div) is clicked, an overlay with a form is displayed on the profile page. I have no idea how I could retrieve the post page details in order to display the text value in the form textarea.
Can this be done via the controller provided the edit button is not a form element which could submit stuff? Is there a way to use the data attributes on the Edit element?
Thanks for the tip, but Iāve been thinking about this and Iām not sure how to do it.
Since itās the same URL pattern, how do you do it? Because you hit āprofiles/user4321ā, you hit Edit, an overlay is opened via jQuery and after you edit the content you hit āSaveā, which is supposed to close the overlay. Iām also not sure how to retrieve the right page since the snippet looks something like this: