This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

VektarDesign
VektarDesign

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

VektarDesign
VektarDesign

For anyone wanted to do the same or something similar, the question has been answered on Stack Overflow by Hardik Satasiya:

https://stackoverflow.com/questions/58451425/october-cms-in-the-controller-create-edit-button-on-preview-htm-which-then-li/58451655#58451655

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.