How to get Current Page language from within a widget? - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to get Current Page language from within a widget?

  • How to get Current Page language from within a widget?
  • 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:

    knowledgebase.progress.com/.../How-to-programmatically-find-the-available-languages-on-the-current-page

    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