Best way to store constants

I have a bunch of constants I use in my templates, i.e, paths to pages outside rhythmyx, that I am currently storing in a keyword. I know that there’s a place for entering variables in the publishing tab, but that’s not such a good interface for my purposes, because I have a lot of these constants, and they don’t vary in value from site to site.

I was just wondering if I should be using the keywords this way, or if it’s too far from the original intention of a keyword and I should do it some other way.

You could channel all content types on all sites via a single dispatch page template (i.e. make it the default for all.) Then anything you add to the bindings of that template will be in scope as variables for the global template, all snippet templates, navigation templates, etc. You’d have to maintain that template, remembering to add any new content types in the future to it.

That’s an interesting idea. Thanks.

I know Velocity as an engine supports importing other Velocity template code from seperate template files. I think with the #include() command… but I couldn’t get it to work when i tried myself… something about how it’s implemented in this app.

You could implement a Global Template that does nothing but set the variables that you habitually use. This is probably the simplest way if you don’t actually use Global Templates for anything at the moment.

Does creating a .vm file in /Rhythmyx/rx_resources/vm work? But, you have to have access to edit the file in the Rhythmyx folder though…

http://forum.percussion.com/showthread.php?t=2059