Forum Discussion

peterlu's avatar
peterlu
Champion
7 years ago

17.9 breaks many sites - ${coreNode.nodeType}

Hi Lithium,   I think 17.9 changed the behaviour of the coreNode built-in object, the below API always returns "board" even if you are in blog, contest and other type of boards. ChhamaJ SuzieH   ...
  • VikasB's avatar
    VikasB
    7 years ago

    Oops, it really not working on pages. But SuzieH it's a good idea to get the board type using coreNode.conversationStyle object as we are getting it in console screen but can not use it on a page. Please have a look on it. 

    Anyway peterlu , You can use the ${page.interactionStyle} to get the type of board.  If you are on a board it would return blog, forum, idea, TKB etc based on their conversation style.  On other pages, it may return None,  for other pages you can use coreNode.nodeType.  

    <#assign nodeType = coreNode.nodeType /> 
    <#if coreNode.nodeType == 'board'> <#assign nodeType = page.interactionStyle /> </#if>