I come back to a previous post from here, I’ve set up a custom panel field to show the historic of modified pages. The problem is that each users can only see their own modifications. My goal is now to show every modified pages from every users. Can I do that without Database, and how ?
I don’t really see why this should only display modifications made by the current user. According to the code, you display the last x modified pages and then attach the current user to this information, no matter who actually modified a page, because that information does not exist.
And indeed, if you want to get the information who actually last modified a page, then you first have to store this information somewhere, either with each page via hooks, or in an external data base).
This code would store the information in a database. For this to work, however, you first have to set up your database.
I’m not really sure what sort of changes $page->modified() actually catches.
Depending on what you want to store in your csv file (which will then be your source of truth for the section, I guess), you might have to use multiple hooks, because page.update:after only catches actual changes to the content, but not changes to the title, slug, status, sorting etc.
One last question : how to make a link on a specific tab from this custom historic panel ? I would like to click on the link to show directly the tab of the page containing the changelog (called #historique) ?
I’ve set this but the link don’t show directly the tab of the page