Get page type used from within widget

Graham Mott asked on March 25, 2020 10:47

Hello,

I am trying to access the page type from within the widget as I want some of its functionality to differ based on the page type.

Kentico 12sp MVC

Thanks, Graham

Correct Answer

Dmitry Bastron answered on March 25, 2020 16:19

Hi Graham,

Could you please explain more what do you want to achieve?

In widget controller you can use .GetPage() or .GetPage<T>() method, check it's type and base your logic on it. Does it answer your question?

0 votesVote for this answer Unmark Correct answer

Recent Answers


Graham Mott answered on March 25, 2020 16:27

Thanks Dmitry,

I hadn't noticed that and was trying to manipulate the tips for the basic widget above. This works fine and was exactly what I was after.

0 votesVote for this answer Mark as a Correct answer

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