Jump to content

Recommended Posts

Posted

I wish to access a template's allowed templates for it's children from the API. This one:

Capture.thumb.PNG.33eea507a44f413ed558867587d7d4da.PNG

I am pretty sure this is possible, but I can't seem to find it anywhere in the documentation. If this is not possible, is there some way of assigning properties to templates? So like fields that already have a value on all pages using that template.

Posted

@tpr Yep that's worked. It returns the ids in an array. How did you find that out? I couldn't see it anywhere in the documentation.

Posted

I needed this when one of my modules installed a few templates, I digged into the core as I remember.

Posted

@tpr Ah, I found it in the database. I will keep that in mind when I want to know another property. But why isn't stuff like this documented? Is there any way people can contribute to the documentation?

Posted

Another trick as mentioned by @Robin S somewhere I now can't find...Hover your mouse over the field's collapse/uncollapse arrow...the name of the  input usually matches the API...;)

api-from-field-name.thumb.png.9ed822149ba27fb66eca1e45b4b830c2.png

 

  • Like 1
Posted
22 minutes ago, Sipho said:

For some reason I can't get that to show up. When I hover my mouse over it it just says "Toggle open/close".

Hmm. What version of PW? It shows for me in 2.7 and 3.0.62.

Posted

Not sure but I seem to recall reading that either debug mode or advanced mode triggered the field name display when hovering.

  • Like 1

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
×
×
  • Create New...