This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
So what I want to do is, from the backend, click on a list item which then, rather than take you to /mymodel/update/id, it takes you to /mymodel/preview/id. The preview page will then have a button which takes you to /mymodel/update/id which matches the ID as /mymodel/preview/id.
I have achieved the first part by changing the config_list.yaml by using 'recordUrl: 'namespace/myplugin/mymodel/preview/:id'.'
However, I cannot seem to find a way to make a button which is then aware of the ID of the current preview which would take me to the same ID but /update/id rather than preview/id.
I am doing this so when people just want to view a record, they don't accidentally change something when just viewing details.
Last updated
For anyone wanted to do the same or something similar, the question has been answered on Stack Overflow by Hardik Satasiya:
1-2 of 2