Forum Discussion

VarunGrazitti's avatar
11 years ago

Getting the Hot Topics count

How can we get the count of the hot topics which we set under  Admin > Layout Settings> Board View Settings, is there any context object for this? We are customizing a component and need the count of hot topics, otherwise we have to hardcode the value, which is not a good option.

  • PaoloT's avatar
    PaoloT
    11 years ago

    Hi VarunGrazitti 

     

    to get that value, you can use this freemarker snippet

     

    <#assign myValue = settings.name.get("layout.messages_per_thread_hot","10")?number />

     

    This is using the settings context object method (and defaulting to 10 if not found for any reason). Hope it helps

3 Replies

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    11 years ago

    Hi 

     

    do you mean the Hot Topics threshold value in the Posts & Topics  -> Post Display section?

    I have not found the one you mentioned

     

    Thanks,

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    11 years ago

    Hi VarunGrazitti 

     

    to get that value, you can use this freemarker snippet

     

    <#assign myValue = settings.name.get("layout.messages_per_thread_hot","10")?number />

     

    This is using the settings context object method (and defaulting to 10 if not found for any reason). Hope it helps