Jump to content

Recommended Posts

Posted

This week we've got a lot of updates on our core dev branch, including new features, issue resolutions and more. For starters, we've added support for making the Trash and Restore features available to non-superusers, along with related improvements. Plus we've got several new useful and interesting page traversal methods and properties added to our $page API.

https://processwire.com/blog/posts/processwire-3.0.107-core-updates/

  • Like 15
Posted

$page->references() is a great addition - I can immediately see it being use for tagging systems.

I would like to now if it is, or maybe will eventually be, possible to use 'references' within a selector.

For example:

// Find all the tags and sort them by the number of references to each tag.
// When looping through the results, the tags are in order of the most references (ie, most used tags) first.
$all_tags = $pages->find('template=tag, sort=-references.count');

 

  • Like 1
Posted

repost of my comment from the blogpost:

Great additions! Thank you!
One question for $page->references():
If a page is referenced from a repeater or similar fields, does it return the repeater page or the the „for page“ (the page where the repeater is used)?

Thanks!

  • 11 months later...
Posted
On 7/1/2018 at 11:36 AM, LMD said:

I would like to now if it is, or maybe will eventually be, possible to use 'references' within a selector.

I would like to know this too. For example in my case I would like to sort pages by the number of their references. ?

It would be great, if you could to that or has somebody please a hint for me how to do this otherwise?

Regards, Andreas

Posted
14 hours ago, AndZyk said:

For example in my case I would like to sort pages by the number of their references.

A recent answer to a similar question:

 

  • Like 2

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
  • Recently Browsing   0 members

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