• Variable in Macro Expression
    Question Mar 8, 2022
    I have a macro expression and wants to assign a variable so it can resolve based on the variable value. So far I am unable to find a way. Can any one please help me to see what I am missing ? So for example I want to display name of a user Id 100, writing code like this works...

  • Visible / Hide macro based on parent permission
    Question Apr 1, 2015
    Hi there, I want to display something based on role (editable text/repeater), in the 'visible' box I've used a macro of: This works but I don't want to edit this each time we amend roles. The parent page set the permission and this page will inherit it so is there a way ...

  • Macro Documents.Where not working
    Question Nov 11, 2015
    Hi. I've picked up a project where a developer has used a macro in the template like this: `Documents.Where("NodeGUID='f9067800-c8b9-46af-86ec-e35678ecc702'")[0].NodeAliasPath` This appears to be returning a valid alias path in the live environment, but on my dev environment ...

  • macro oddity
    Question Aug 19, 2016
    I'm trying to write this simple conditional logic in my Text/XML transform. Looking at the logic, it should only be setting a variable to a bool value. However I actually get an output of FALSE in my page. I"ve confirmed that the line below is outputting FALSE. Any idea w...

  • Editable text doesn't return html tag from macro inside default text field
    Question Nov 22, 2016
    Hi, I'm trying return some default text from macro Macro returns html anchor tag with text inside It gives me only text.... What is wrong? Maybe there is some setting or property which allow return html? When I insert this macro into content before/after it returns html....

  • Custom macro error: Method for object of type 'System.Int32' not found, please check the macro or th
    Question Oct 26, 2018
    Hello I have following custom `Macro` method setup [MacroMethod(typeof(bool), "Comment ", 2)] [MacroMethodParam(0, "id", typeof(int), "Comment")] [MacroMethodParam(1, "number", typeof(int), "Comment")] public static object Method(EvaluationContext context, pa...

  • Macro within page type field not resolving
    Question Oct 9, 2020
    We have a macro that returns a string based on a cookie value (the value is matched to a list of theme colors): CurrentTheme("") returns "theme_red" if this was previously set, else a default value is returned It also creates/updates the cookie value when a second "override...

  • Get Document by URL in macro
    Question Sep 24, 2015
    I'd like to write macro expression that get document by url and retrive value from its property. Is it sossible?

  • Get Value of custom page type field in transformation of repeater with macro
    Question Jun 13, 2017
    I have a scenario where i want to get the value of custom page type inside transformation with help of macro. I have written a macro method which accepts one parameter whose value I want from custom page type field. I am using a Repeater web part in which I am using my custom ...

  • String.Contains() not wot working
    Question Mar 2, 2017
    I am trying to use String.Contains(URL,"http"), but it is not working. The event log is showing an error saying: Method 'Contains' for object of type 'CMS.MacroEngine.StringNamespace' not found, please check the macro or the method declaration. Yet this macro is on the Macr...

  •   ... 11 12 13 14 15 16 17 18 19 20 ...