Jump to content

Page Reference Field Item Number?


wesp
 Share

Recommended Posts

Hello everyone,

Is there a way to access the key number of an item in a page reference field and then output it as a value?
So for example I want to automatically output the number 1 if the referenced page is the first in the list and have it be updated when the list is reordered via drag and drop.

Thanks in advance!

Link to comment
Share on other sites

22 hours ago, wesp said:

Is there a way to access the key number of an item in a page reference field and then output it as a value?

You're nearly answering your own question there. The key is the position number in the field (zero-indexed like all arrays).

Using this field as an example...

2019-12-05_214504.png.e2557e32afc1ec8199f8ff06279e16fa.png

The key is the position:

2019-12-05_214759.png.7959f5f73b79af31b31c3d0e6479e7c4.png

 

  • Thanks 1
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

×
×
  • Create New...