Custom Macro Rule

Amy Patterson asked on May 5, 2022 07:35

Hi I want to create a global custom macro rule in my site that returns a string.

To keep things simple, My Macro Rule for this question is Site Name, and the default value is "hello world"

Can you share with me the steps on how to accomplish this? I have been trying in the Macro Brainbench, but just can't seem to pick the correct property.

Example: GlobalObject.MacroRules.SiteName.How do show the default text value when my Macro Executes?

Recent Answers


Brenden Kehren answered on May 6, 2022 16:07

To get the site name, use the following macro:

{% SiteContext.CurrentSiteName %}

0 votesVote for this answer Mark as a Correct answer

vasu yerramsetti answered on May 7, 2022 08:52

Tyler Bockler answered on May 9, 2022 03:54

This question was about creating global macro rules in the portal macro rules application and not about making brand new customized macro's.

I was able to make it work, but it took a day to try different ones in the benchmark to finally get the macro rule to return text. Thanks for your efforts.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.