id-chalmers
Joined 13 years ago
Joined 13 years ago
Maybe you can try the rest API, that's how I did it until now (never used the title though):
inside FreeMarker
<#assign title = restadmin(someboardnode.@href + "/settings/name/customcontent.1_title").value />
I'm using restadmin here because I had issues with anonymous users not seeing the custom content...don't now why it's necessary, but restadmin solves it...
id-chalmers - As of now, there is no direct way to differentiating, the post page is common for messages, blog post and ideas etc. The only way you have is to get the ID of the board you are on from the URL using the context objects, and make a rest call to check the interaction style of this, if it is idea, you proceed with it.
e.g. you are on this page /t5/forums/postpage/board-id/product-ideas You have to make a REST call: /restapi/vc/boards/id/product-ideas/interaction_style Reponse: <response status="success"> <value type="string">idea</value> </response>
Let me know if this helps.
If your community allows weighted kudos... you could have 25 users with 83 kudos.
Otherwise, you may have to specify a page size. From the kudos API:
Parameter Type Possible Values Description
| page_size (optional) | int | The size of the page to be returned. When displaying threads, we recommend showing no more than 25 threads per page. Specify a number from 5 to 1000. | |
| page (optional) | int | The 1-based index of the page to be returned. |
Hi id-chalmers
have you tried with the attempt / recover freemarker directive?
<#attempt>
<#assign board = rest("boards/id/iDoNotExist").board />
<#recover>
Something went wrong
</#attempt>
Hope it helps
I don't think pulling in only content from announcements is feasble but if you just want to get the announcements text, you could use a workaround, like using the Custom Content in admin and then call it inside the Custom Component in studio using rest call.
e.g. if you're using custom content 1 in admin to store the announcements text, use following call in your costom component.
<#assign cc1_text= restadmin("/settings/name/customcontent.1_text/").value>
Or other workaround might be, to override the announcements component, this might help you what you're looking for.
http://community.lithium.com/t5/Community-FAQs/Using-override-to-change-core-components/ta-p/61358