Warren_Brill
6 years agoBoss
List of all blog articles across the Community, but excepting one or more categories
I'd like to create a custom page that lists all blog articles across the site, but excepts one or more categories. Display parameters (e.g., ORDER BY) are less important than excepting the archives.
Has anyone done this? It would be a boost for SEO, as well as a list per se.
when I put the JS into a component and save it, it executes from inside Studio, and I had to blow away the component entirely, lest it hang up Studio
this you can easily avoid by wrapping your JS into an #if block, like so:
<#if !page.name?matches('BizAppsPage')> <#-- add your JS, but not in the backend --> <@liaAddScript> </@liaAddScript> <#-- or simply --> <script> // here goes your JS </script> </#if>
Regarding the API call I can't really help right now, Lithium/Khoros just locked everybody out of the Dev-Docs Portal (they did a redesign there...), e.g. looks like this when trying to access the API v2 message collection...
You can try to update your code with the following
<#assign articleList = rest("2.0","/search?q=" + "Select * from messages where board.id='AroundtheStorageBlock'"?url) /> <#if (articleList.data.size?number > 0) > <#list articleList.data.items as article> <#-- your code for list comes here and you can acess detail about each article eg--> <p><a href="${article.view_href}">${article.subject}</a></p> </#list> <#else> <p>No articles in the given board ID</p> </#if>
The anchor would create the link to the article's details.
Hope that's the solution required.
Regards
Tarun Kumar