teppo Posted July 1, 2014 Posted July 1, 2014 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?
Soma Posted July 1, 2014 Posted July 1, 2014 Page lister uses has_parent!=2. There could also be pages under admin without admin template. 2
teppo Posted July 1, 2014 Author Posted July 1, 2014 @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
Soma Posted July 1, 2014 Posted July 1, 2014 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.
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