Hello,
We are working on a Foundation 4 based system in MODX that has a lot of variables. For example, we want the user to be able to choose either the Orbit slider or NivoSlider and within each, the ability to set things like transition, transition speed, etc. Another example is the ability to change the number of calls to action on a home page from 2, 3, 4, 6, 8.
As we see it there are 3 strategies for this:
- Create an Admin Resource
Tie it to an Admin Template and tie a lot of Template Variables (in various categories) to that template.
Get the values of the TVs by using:
[[getResourceField? &id=`xx` &field=`whatever`]]
Or MIGX by document ID when appropriate.
Use conditionals with methods like:
- The more efficient element modifier method:
[[[[[[getResourceField? &id=`xx`&field=`whatever`]]:is=`something`:then=`$somechunk`]]]]
- Using the If snippet when the element modifier method doesn't work
- Using the Switch snippet when multiple possibilities exist
Issues include:
- Performance
- Interface Complexity (but using Forms Customization and an appropriate ACL the user would only see the TV tab for this Admin Resource)
- What else?
- Use ClientConfig
Use the same set of conditional methods.
Issues include:
- Not (yet) Context sensitive (which basically kills this method at this point)
- Doesn't (yet) support various TV type fields such as Rich Text
- What else?
- Context Settings
Similar to ClientConfig but without a nice interface but being, obviously, context sensitive.
Issues include:
- Doesn't (yet) support various TV type fields such as Rich Text
- What else?
Has anyone used other methods are have better ways for these methods?