Public
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mentor

How do I exclude replies from the count of Ideas in a board, and only show number of actual Ideas.

I have a set of Ideas boards in different categories. The list of boards shows a count of posts, but this count also includes replies to the ideas.

 

For example, Board A says "8 Ideas" but the board actually only contains 2 ideas, with a total of 6 replies to them. 

 

Where do I tweak this so that it only counts the top level nodes and so displays "2 Ideas"?

12 Replies 12
Director

@dpowles - You need to add "depth=0" if you are using LIQL query to get the ideas, it will display only the main idea post and exclude replies.

For example:

Select count(*) from messages where conversation.style='idea' and depth = 0

Please let me know if this helps.

Thanks!

Payal Uppal

Makes sense, but where would this change be made - within Studio?

 

I didn't configure this so I'm not familiar where to make these tweaks to queries.

@dpowles - Can you please confirm if you are using custom component or OOTB, means Khoros default component? 

Payal Uppal

@Payal , some custom components are in use - just not sure if this one is custom or OOTB.

@dpowles - If this is a custom component, then there will be  LIQL query used and you need to make a change in that. 

Payal Uppal

I have this same situation.  Ours is likely NOT a custom component. Do I need to use a custom one to make this change?

Khoros Alumni (Retired)

@mhock in which out-of-the-box component are you seeing that incorrect count? That seems like a bug to me.

Former Developer Experience Program Manager for Khoros. Please post in the Developer Discussion Forum if you have questions about the Khoros APIs.

@SuzieH,

I am in studio looking for the page and I can't find it to give you the components.  It is landing page that list all of our idea boards.  

How would a page like that be labeled in studio? 

I can find the idea page but I am looking for one level above.  I would share the URL but we have a closed Community.  It wouldn't help. 

Khoros Alumni (Retired)

A page above ideation nodes sounds like a category page. You can identify a page type by looking at the URL. I assume the one you are looking at contains "ct-p" in the URL. See here for a full explanationhttps://community.khoros.com/t5/Community-FAQs/Understanding-SEO-Friendly-URLs/ta-p/6560

If that's the case you would need to have a look at the "Category Page" layout in Studio and check which component - out of the box or custom - is used on that location. Then we can identify next steps.


Khoros Best Practice until August 2019. Onwards posting as Claudius.
Learn how to master Khoros. Learn Best Practice in the Community Documentation
If you appreciate my efforts, please give me a kudo ↓
Accept as solution to help others find it faster.

@ClaudiusH it's a category page using an out of the box component, and the requirement would be to display the counts differently for these ideation nodes than for other content types (forums, TKBs etc)

Categorypage-Components.png

@ClaudiusH Thanks for the direction.  Found the category page and the component is the theme-lib.category-board-tiles.  It appears to be an out of the box component.

As for the LIQL query, I have no idea where I am headed there. 

 

It appears to be a LIQL query since it is out of box. 

I am a neophyte on coding.  Am I able to simply place your "Select" example in this code.

<#assign qry = "SELECT id, title, view_href, description, topics.count(*), c_node_icon_url FROM boards WHERE parent_category.id = '${coreNode.id}' AND hidden=false ORDER BY position ASC" />
<#assign boards = executeLiQLQuery(qry) />

Should I replace the current topics.count(*) and change it to read:

<#assign qry = "SELECT id, title, view_href, description, count(*) from messages where conversation.style='idea' and depth = 0, c_node_icon_url FROM boards WHERE parent_category.id = '${coreNode.id}' AND hidden=false ORDER BY position ASC" />
<#assign boards = executeLiQLQuery(qry) />

 

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.