Description of default Components and FreeMarker information
I am currently trying to figure out the possibilities of our Lithium install, and am therefore interested in finding out more about the default components that are available.
I have searched though the content available to me on the Lithium Training site, and I have searched the Knowledge Base and the forums here, but have not found anything to help me.
Are there a place where you can see a list of all components, and a description of what they do?
Can you customize/configure these default components in any way, or are they just 'as is'?
I have also stumbled upon FreeMarker. First of all, I am a bit supprised that FreeMarker is not mentioned in the Learning stuff I've seen, I found out about it in a random thread on the Customer Forums.
Is it true that you are unable to use a users avatar using FreeMarker syntax, I havent found any mention of it on the pages here http://lithosphere.lithium.com/t5/Everything-Studio-Knowledge-Base/Writing-custom-components-in-Lithium-Studio/ta-p/9217
At this time, there is not a complete list of the default components and description of what they do although I do believe that is coming soon to studio (descriptions at least). There is not a lot of customization that can be done to default components but you can use those components in custom components. For example, if I wanted to show search only to logged in users
<#if user.registered > <#-- if the user is not anonymous --> <@component id="common.widget.search-form" showAdvancedSearchLink="false" /> </#if>
You can use a user avatar with freemarker, you just also need to use our REST API like this:
<#assign avatar = rest("/users/id/[user id]/profiles/avatar").image />
<#if avatar.url?length gt 0>
<img src="${avatar.url}">
</#if>You will need to replace [user id] with the id of the user whose avatar you want. If you are looking to display the current user's avatar you can use
${user.id}
. Hope that helps.
Edited - I had a longer example but my html is code is being interpreted instead of displayed. I will update when I fix that :)