Register custom written methods in kentico macros

Prashant Verma asked on October 23, 2015 09:05

Hello, can anyone tell me that how I can implement the custom macro and call it on a page or control. I review the documentation but not getting it please help me out.

Thanks In Advance

Recent Answers


David te Kloese answered on October 23, 2015 09:23 (last edited on December 10, 2019 02:30)

Hi,

Have you followed all these steps: https://docs.kentico.com/display/K8/Registering+custom+macro+methods

Most likely something went wrong when Registering your new macro. See the "Registering" section on the link above.

--

If these are correct where are you trying to call your macro? Is it just your macro that's not working? Try a default macro to see if that works:

{% SiteContext.CurrentSiteName |(identity)GlobalAdministrator%}

You might be trying to call a macro on a place it doesn't work or in the wrong way.

--

you could try the Kentico Macro Benchmark / or Console section of your installation to test your macro:

System > Macros > Console/Benchmark

Greets,

David

0 votesVote for this answer Mark as a Correct answer

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