Jump to content

Tip when using $pagearray->getSelectors()


Soma
 Share

Recommended Posts

If you're no aware of this, you can get the selectors string that is used to produce a resulting PageArray with $a->getSelectors().

http://cheatsheet.processwire.com/?filter=getSelectors&advanced

When printing this out in your templates html, I noticed that if you have used a "<" operator it will cut off the string from there, because it's rendered in html.

To get around this simply use:

echo htmlentities($result->getSelectors());
  • Like 2
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...