Jump to content

Including admin template in InputfieldSelector value


teppo
 Share

Recommended Posts

For a module I'm working on I'm trying to use InputfieldSelector to define a selector that iterates pages excluding those with admin template. It seems that InputfieldSelector isn't picking up "template!=admin" (or template=admin for that matter) properly -- does anyone know if a) this is intentional, b) why is that and c) is there a way around this?

Currently I'm using "has_parent!=2, id!=2" instead, but that seems potentially unstable (though it's quite unlikely for this ID to change) and much less obvious than "template!=admin".

Any ideas?

Link to comment
Share on other sites

@Soma: good point, perhaps that really is the way to go. With id!=2 added, it works just as well (and perhaps even better) anyway. Thanks!

I'd still imagine having trouble with this in other places (template=admin and template!=admin are, after all, perfectly valid and usable selectors), but at least for now I'm good :)

Link to comment
Share on other sites

I'm not sure why template=admin wouldn't work, just wanted to mention what I observed. I'm also seeing admin template is a system template and not selectable by selector config in PageLister. 

Link to comment
Share on other sites

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...