Jump to content

Ability to Add Field to Page (instead of to Template)


Recommended Posts

I'm not sure if this has been brought up before, and I definitely know this idea is very wishful thinking since it goes directly against how ProcessWire is supposed to work, but I thought I'd bring it up anyway.

Currently, if you want to add a field to a page, you must add that field to the template that the page uses.  This means, the field will exist not only for that specific page, but any pages that use the same template.

Sometimes however, I want to add a field to a specific page without having to give that page a unique template.  Perhaps I'm a little lazy, or perhaps it just seems like creating a specific template feels like overkill, although that is the ProcessWire Way.

If you are familiar with Advanced Custom Fields for WordPress, it does have this kind of functionality (in addition to a few other cool ways to assign fields), but WordPress of course handles custom fields in a much more "loose" way.

Any thoughts on this?

  • Like 1
Link to comment
Share on other sites

Is it possible to use visibility settings to show a field on a specific page?

Yes.

Scenario 1: Let's say you want to show a field on all pages that are the child of a certain page.  In the visibility settings put:

parent_id=id-of-parent-page-here

Scenario 2: Let's say you want to show a field on a specific page. In the visibility settings put:

id=id-of-page-here

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

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