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.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

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

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM