Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • General
  • Design & Templates
  •  
  • [revo] get menuindex of current page#

  • 38537
    25

    zapzarap Reply #1, 3 months, 2 weeks ago

    Reply
    • Link to this post#1
    hey there,
    new day, new question.
    I need the menuindex of the current site.

    for example:

    web
    + page 1
    + + page 4
    + + page 5
    + + page 6
    + page 2
    + + page 7
    + + page 8
    + page 3

    so. when i'm on page 8 the menuindex will be 2, 'cause that is the second element from his parent.
    how can i get the menuindex?

    thanks for your help


  • 28042
    15,112
    How MODx Evo Works

    Log in to an Evo Manager username guest, password guestuser.

    sottwell Reply #2, 3 months, 2 weeks ago

    Reply
    • Link to this post#2
    [[*menuindex]]
    


    http://rtfm.modx.com/display/revolution20/Commonly+Used+Template+Tags
    Edited 3 months, 2 weeks ago by sottwell


  • 38537
    25

    zapzarap Reply #3, 3 months, 2 weeks ago

    Reply
    • Link to this post#3
    sorry my mistake. this example:
    web
    + page 1
    + + page 4
    + + page 5
    + + page 6
    + page 2
    + + page 7
    + + + page 9
    + + + page 10
    + + page 8

    so when i'm on page 10, i need two values.
    for first the menuindex of his parent (page 7): so the value is 2.
    and then i need that menuindex-value from the parent…
    + page 3


  • 33968
    700

    Lucas Reply #4, 3 months, 2 weeks ago

    Reply
    • Link to this post#4
    This is possible but first I'm curious what you intend to achieve with this? Depending on that we can suggest a suitable solution for you


  • 38537
    25

    zapzarap Reply #5, 3 months, 2 weeks ago

    Reply
    • Link to this post#5
    On page2 I used getRessource to became a horizontal slider of page 7, and page 8 and the slider page 8 has a vertical slider of his child elements.

    And I need to calculate the correct x- and y-coordinate for the non-javascript-version.
    and this is why i need these two values. (:


  • 19369
    917
    Jertix.org -> Web Design & Development, Motion Graphics | Follow me on Twitter | MODx Tutorials (in Italiano) | MODx Snippets (English)

    microcipcip Reply #6, 3 months, 2 weeks ago

    Reply
    • Link to this post#6
    I think you can achive this with getResourceField Snippet.
    Here is an example:
    [[getResourceField? &id=`[[*parent]]` &field=`menuindex`]]
    [[getResourceField? &id=`[[UltimateParent]]` &field=`menuindex`]]
    
    Edited 3 months, 2 weeks ago by microcipcip


  • 38537
    25

    zapzarap Reply #7, 3 months, 2 weeks ago

    Reply
    • Link to this post#7
    No, that doesn't work correctly.
    page 9 and page 10 became the same values. and that makes no sense.


  • 19369
    917
    Jertix.org -> Web Design & Development, Motion Graphics | Follow me on Twitter | MODx Tutorials (in Italiano) | MODx Snippets (English)

    microcipcip Reply #8, 3 months, 2 weeks ago

    Reply
    • Link to this post#8
    If you need the menuindex of the current page just use without any Snippet.


  • 3749
    11,692
    PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!

    MODx info for everyone: http://bobsguides.com/MODx.html

    BobRay Reply #9, 3 months, 2 weeks ago

    Reply
    • Link to this post#9
    Quote from: zapzarap at Feb 07, 2012, 04:25 AM
    No, that doesn't work correctly.
    page 9 and page 10 became the same values. and that makes no sense.

    Try calling the snippets uncached:

    [[!SnippetName]]




    ---------------------------------------------------------------------------------------------------------------
    PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
    MODx info for everyone: http://bobsguides.com/modx.html





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
BobRay, microcipcip, okyanet, sottwell, zapzarap

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy