Skip to main content
added 6 characters in body
Source Link
Gareth
  • 1.6k
  • 2
  • 14
  • 35

Is there a way in Craft to get the order numberproperty of the current entry when it's in a structure? For example say you have the following structure:

  • Parent Page
    • Child One
    • Child Two
    • Child Three

Is there a way to get what order numberproperty Child Two is in relation to its siblings so in this case it would be 1 (zero based)?

In my templates I am wanting to be able to grab the order numberproperty for the current entry by doing something like {{ entry.getOrder() }}.

Is there a way in Craft to get the order number of the current entry when it's in a structure? For example say you have the following structure:

  • Parent Page
    • Child One
    • Child Two
    • Child Three

Is there a way to get what order number Child Two is in relation to its siblings so in this case it would be 1 (zero based)?

In my templates I am wanting to be able to grab the order number for the current entry by doing something like {{ entry.getOrder() }}.

Is there a way in Craft to get the order property of the current entry when it's in a structure? For example say you have the following structure:

  • Parent Page
    • Child One
    • Child Two
    • Child Three

Is there a way to get what order property Child Two is in relation to its siblings so in this case it would be 1 (zero based)?

In my templates I am wanting to be able to grab the order property for the current entry by doing something like {{ entry.getOrder() }}.

Source Link
Gareth
  • 1.6k
  • 2
  • 14
  • 35

How to get the order number of the current entry in a structure

Is there a way in Craft to get the order number of the current entry when it's in a structure? For example say you have the following structure:

  • Parent Page
    • Child One
    • Child Two
    • Child Three

Is there a way to get what order number Child Two is in relation to its siblings so in this case it would be 1 (zero based)?

In my templates I am wanting to be able to grab the order number for the current entry by doing something like {{ entry.getOrder() }}.