May 29, 2009

Setting the sort order for custom admin items in FarCry

I’ve wanted to be able to control the sort order of menu and menuitems in the customadmin.xml (or equivalent) file for quite a while but hadn’t found how to do it. Only today did I find the ability, I believe it’s a FarCry 5+ feature which was why I didn’t see it before.

The answer is simple, just add a “sequence” attribute to your menu or menuitem tag:

<menu mergeType="merge" sequence="1" id="farcry_studentsonlineadminSubSection" label="Homepage Content" labelType="value">
	<menuitem id="boardlinks" sequence="1" label="Board Links" link="/admin/customadmin.cfm?module=customlists/boardlinks_data.cfm" />
	<menuitem id="boardlinks_sort" sequence="2" label="Board Links Sort Order" link="/admin/customadmin.cfm?module=customlists/boardlinks_sort.cfm" />
	<menuitem id="calendar" sequence="3" label="Calendar" link="/admin/customadmin.cfm?module=customlists/lu_calendar.cfm" />
	<menuitem id="faq" sequence="4" label="FAQ's" link="/admin/customadmin.cfm?module=customlists/lu_faq.cfm" />

You can read more cool things you can do with your custom objectadmin on the FarCry docs site.

© Michael Sharman 2017