Using custom folder properties

CUSTOM FOLDER PROPERTIES

When you right click on a folder in Content Explorer and choose “Properties…” from the menu, the Folder Properties Dialog opens. The dialog contains three tabs. The right tab is labeled “Custom” (although it may have been labeled “Properties” on previous versions of Rhythmyx). On that tab, you can set custom properties for the folder. These properties are name/value pairs. I am wondering how these custom properties can be used, particularly when publishing to a database.

USE CASE

I plan to have a content type to hold special offers, which will be published to a database. These special offers can be for one of three different brands, so one of the columns in the target database will hold the “brand code.”

Of course, this could easily be accomplished by including a sys_DropDownSingle field in the special offer content type that allows the content author to select the desired brand code. Instead, however, I would like to have a separate folder for each brand and have the published brand code come from a custom folder property. The content author would just have to place the special offer content items in the correct folder, rather than select a value from a drop-down field.

Is this possible, and what does the JEXL expression look like for the database publishing template?

Also, if this is possible, can it be made flexible enough so that the content items could be in a sub-folder of the brand folder, rather than directly in the brand folder?

Thank you for your time.
John

I’m sure this can be done. Just off the top of my head, however, it may require you to write some java that does the work. This could then be called from jexl or velocity.
You would pass the folder, obtained from the assembly item, to the method. The method would load the corresponding folder and look at its properties. If the desired property wasn’t present, it could continue with the ancestor folder and repeat, walking up the ancestors until the root was reached.

Thanks for your reply Paul. I hope to work on this in the next few weeks, and will try to post if I am successful.

-John