We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    Ok so first in short my issue. Unfortunately this rule won’t work:
    mm_default('menuindex', 0);

    Can this be fixed?

    Now the lengthy scenario smiley What I use it for: I add subdocuments in my doctree which i display in ditto on their parent document. This way i have a dynamic block layout. I’ve setup QM+ to display add and edit buttons for each of them. It works very well (you can set which template QM+ must use for your new document buttons).

    One remaining thing i need to tackle is ordering of those block items on the page. I need to use menuindex because a tv is always stored as text which sorts wrong with numbers (yes i know .. leading zeroes and padding .. but that’s such a hassle). So menuindex i chose, so far so good.

    The problem with using menu index is: If you add a normal subpage as opposed to a block template it also gets automatic menuindex numer abd pollute my block numbering. The solution I have in mind is setting menu index always to 0 except for block templates. For this I need to default everything else to 0. Any ideas?
    • In the Configuration set Menu indexing default to No. It’s near the bottom of the Site tab.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 36805
        • 354 Posts
        Thanks but i want it to be max(index)+1 for some templates and for one specific always zero. I came up with a plugin for this which seems to work. I’ll have to test it some more though smiley