Macro/Format With Variable Parameters

voltmer1's Avatar

voltmer1

03 Aug, 2015 08:56 PM

I come from using the Umbraco CMS where "macros" have properties that can be changed for each instance of the macro being used. For example a lightbox would have several properties: slide folder, transition, speed, etc. These would all be customizable by the user after placing the macro within the cms content window. Is there anyway of accomplishing something like this in Cascade server?

  1. 1 Posted by Ryan Griffith on 06 Aug, 2015 07:36 PM

    Ryan Griffith's Avatar

    Hi,

    You can accomplish this using the Velocity #macro directive, where you create a macro with the desired parameters. You could additionally import that macro from another format.

    I'm not 100% sure if you can leave out parameters, but if not, you could pass in a HashMap with key/value pairs that contains your macro's options. Within your macro you would have some logic to handle validating the options.

    Please let me know if you have any questions.

    Thanks!

  2. Tim closed this discussion on 25 Aug, 2015 12:56 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac