Leftfield Posted December 13, 2019 Share Posted December 13, 2019 Hi @All I am trying to add an link to field "favorite" (checkbox) in the backend in the row "Edit, New, View... Favorite", A link should imitate the field favorite and when you click on it, it should check/uncheck field without editing the page. I assume there is a solution on the forum, but after wide search, couldn't find it. Tried to add it in "List of fields to display in the admin Page List" but you cant check it without editing the page. PW: 3.0.146 PHP: 7.3.5 Link to comment Share on other sites More sharing options...
dragan Posted December 13, 2019 Share Posted December 13, 2019 I've never tried to add a custom page list action myself, but it definitely seems possible, since it's hookable. I've found a few forum threads that could get you on the right track: https://processwire.com/talk/topic/10254-custom-page-actions/ https://processwire.com/talk/topic/2203-right-hook-right-after-the-pagelistactions/ https://processwire.com/talk/topic/14235-added-custom-action-but-it-doesnt-do-nothing/ 1 Link to comment Share on other sites More sharing options...
Leftfield Posted December 13, 2019 Author Share Posted December 13, 2019 @dragan yea I know it's hookable. Trying to find optimal solution. Seams like module is excellent solution. Will post result. 1 Link to comment Share on other sites More sharing options...
OLSA Posted December 16, 2019 Share Posted December 16, 2019 Hi, here is ProcessPageToggle module and it is almost the same like @dragan post link to another forum thread, or what can be found inside Processwire Copy/Clone module. This is basic variant and need to be configured inside file, as example: // ProcessPageToggle.module // set action button label protected $actionLabel = 'Favorite'; // set page template(s) protected $templates = array('blog'); // set page checkbox field name protected $targetField = 'favorite'; Download, edit, and install like any other PW module. ProcessPageToggle.module 3 1 Link to comment Share on other sites More sharing options...
Leftfield Posted December 16, 2019 Author Share Posted December 16, 2019 Hey man, Thank You!!! Link to comment Share on other sites More sharing options...
Abe Cube Posted December 8, 2021 Share Posted December 8, 2021 How to add a button in the same row and opens a page with some inputfield? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now