Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
HI, there; I am very new to this Umbraco. I am creating my own controller.
I am getting compile error: The name 'CurrentTemplate' does not exist in the current context.
My Umbraco version is 7.4.
It seems I am missing some name space or reference.
Can someone help this please?
Cheers Robert.
Hi Robert,
Make sure your controller inherits from RenderMvcController in Umbraco.Web.Mvc,
then you will have access to the CurrentTemplate ActionResult helper to use from your hijacked controller.
regards
Marc
Thanks Marc. It works!
Originally I inherit from SurfaceController
Cheers Robert
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
The name 'CurrentTemplate' does not exist in the current context
HI, there; I am very new to this Umbraco. I am creating my own controller.
My Umbraco version is 7.4.
It seems I am missing some name space or reference.
Can someone help this please?
Cheers Robert.
Hi Robert,
Make sure your controller inherits from RenderMvcController in Umbraco.Web.Mvc,
then you will have access to the CurrentTemplate ActionResult helper to use from your hijacked controller.
regards
Marc
Thanks Marc. It works!
Originally I inherit from SurfaceController
Cheers Robert
is working on a reply...