More in this section
Forums / Sitefinity SDK / How to get Current Page language from within a widget?

How to get Current Page language from within a widget?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
1 posts, 0 answered
  1. Ricardo
    Ricardo avatar
    0 posts
    05 Dec 2016
    23 Aug 2017
    Link to this post

    Hi, I have seen many similar questions here on the forum,  most of them about getting the current page Node which I have already tried with no success. Also this one:

    I am working with feather,  I have created a custom widget, it has its own controller and view. I am not sure if I am doing it wrong to get the current page.

    From the controller I have written what the above link suggests:

    var actualSitemapNode = SiteMapBase.GetActualCurrentNode();
    PageManager pageMgr = PageManager.GetManager();


    GetActualCurrentNode() returns null every time, and seems that I need this to get the page ID and from there find the page languages available.

    I have also tried with:
    SiteMapBase.GetCurrentProvider() -> Object retrieved,  but in CurrentNode I get null.
    SiteMapBase.GetCurrentNode() -> returns null


    Any clue what I am missing? Any help is appreciated


1 posts, 0 answered