ContributionsMost RecentMost LikesSolutionsRe: What is the default component for listing posts on a boardPerfect. Thank you for the tip as well.What is the default component for listing posts on a board We've been using a custom component for a long time and I'd like to restore the lithium default component while I rework a few things. Does anyone know what the component ID is? SolvedRe: How to detect search context (forums vs tkb) on SearchPage Following the recommendation, here is the code I ended up with... <#if page.name == 'SearchPage' && http.request.url?index_of('tkb')?number gt 0> // Knowledge Base tab on Search Page is selected </#if> How to detect search context (forums vs tkb) on SearchPage On the SearchPage, I would like to change the styling based on if users are searching the forums or knowledge base, or users. I see that within the url, this information exists. t5/forums/searchpage/tab/tkb?location=community%3Azjzhh79394 Is there a way to access this via freemarker? SolvedV2 API: How do I get author's kudo count for past month? In the following code, I can retrieve the list of users who have kudos in the last month, then for each user I get their details to display them. I wish to get the kudo count for each author, however the API doesn't seem to allow a comparison with the KUDO table's TIME attribute. Any ideas? <#assign lastMonth = dateToday - (30 * 24 * 60 * 60 * 1000) /> <#assign oneMonthAgo = lastMonth?number_to_datetime?iso_local /> <#assign top_users = rest("/kudos/authors/leaderboard?max_age=one_month").users /> <#list top_users.user as user> <div>User ID: ${user.id}</div> <#assign userAvatar = rest("/users/id/${user.id}/profiles/avatar/url").value /> <#assign userKudos = rest("2.0","/search?q=" + "SELECT * FROM kudos WHERE time > ${oneMonthAgo} AND message.author.id = '${user.id}'"?url).data.size /> <#assign userInfo = rest("2.0","/search?q=" + "SELECT * FROM users WHERE id = '${user.id}'"?url).data.items /> <a id="user_${user.id}" class="dk-component-item member" href="${userInfo[0].view_href}"> <div class="member-icon" style="background-image: url('${userAvatar}');"></div> <div class="member-name">${userInfo[0].login}</div> <div class="member-badge">[badge]</div> <div class="member-kudos">${userKudos} <span class="label">kudo<#if userKudos gt 1>s</#if></span></div> <div class="member-rank">${userInfo[0].rank.name}</div> </a> </#list> SolvedHow do I exclude messages from a particular board using a LiQL query? I would like to run a LiQL call where I retrieve the latest posts from the community, however I would like to exclude messages from a particular board. The following query doesn't work as the error says != is not a valid operator. SELECT * FROM messages WHERE category.id='xxxxxxxx' AND board.id != 'test' AND depth=0 ORDER BY post_time DESC LIMIT 15 Does anyone have any other suggestions? How to access an endpoint from component using freemarker I've created a working test where I can access the json content in my endpoint using javascript. From this post, it sounds like this is possible with freemarker, however I have yet to find any sample code. Can anyone provide sample code for this? Re: How do I get message id from Post Page? Because the message context object is not available on the post page, I found that you need to resort to other methods. The solution I implmented was to parse the request url with freemarker to grab both the board ID and message ID. Here is the freemarker code... <#assign boardKey = "board-id"> <#assign messageKey = "message-id"> <#assign urlString = http.request.url> <#assign strCount = 0> <#list urlString?split("/") as subStr> <#if messagePos?? && strCount == messagePos> <#assign messageID = subStr> </#if> <#if boardPos?? && strCount == boardPos> <#assign boardID = subStr> </#if> <#assign strCount = strCount + 1> <#if subStr == boardKey> <#assign boardPos = strCount> </#if> <#if subStr == messageKey> <#assign messagePos = strCount> </#if> </#list> <#if boardID??> <div>Board ID: ${boardID}</div> </#if> <#if messageID??> <div>Message ID: ${messageID}</div> </#if> Re: How do I differentiate a text string by category/board? As Vishwajeet mentioned, the following does work... menubar.button.new_message = New ${general.Message} However, if you do a search for the the text key general.Message, you'll see how the magic happens. Using the @place extension you can specify strings based on location. menubar.button.new_message = New Post menubar.button.new_message@place:tkb = Create New Document Other location values include... @place:tkb @place:board @place:blog @place:idea @place:qanda //question @place:support @place:contest Note you can also use the @message extension for specific types of messages and string them with the @place extension Examples... general.Message@place:blog@message:root = ${general.Message} general.Message@place:blog@message:reply = ${general.Comment} How do I differentiate a text string by category/board? In our knowledgebase area, we would like the "New Message" button to display "New Article". The text key for this is... menubar.button.new_message However, when this is changed, it also affects the forums area where we would like it to say "New Message". Is there a way to have this button change text based on the board? If not, is there freemarker code I could use to create a custom button that behaves the same way? Solved