Jump to content

Recommended Posts

Posted

Hey,

I am looking for a good way to add a setting to a template using code only. 

Like a checkbox in the template options... 

Thanks

Posted

I haven't had an answer yet so I figured I post some more details.

I want a setting that enables MVC for my Module on template level, i want this to be a checkbox. How do I approach this? Can this be done with code lets say in the ___install() method of my module? 

Much appriciated

Posted

Have a look at mindplay.dk's Template Decorator module. It's a good example of doing this by hooking into ProcessTemplate::buildEditForm and ProcessTemplate::executeSave.

  • 1 year later...
Posted

it looks like ProcessTemplate::buildEditForm  is a good example lets you create your own settings tabs, but is there any way to add or modify the "settings" of a page to add your own custom status, or would those have to go in their own Tab?

Posted

it looks like ProcessTemplate::buildEditForm  is a good example lets you create your own settings tabs, but is there any way to add or modify the "settings" of a page to add your own custom status, or would those have to go in their own Tab?

Check out this post from Ryan where he explains how to use: ProcessPageEdit::buildFormSettings

https://processwire.com/talk/topic/510-name-field-in-content-instead-in-settings-tab/?p=4830

  • Like 3

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...