wearesocialit
Joined 11 years ago
Joined 11 years ago
You can also do this similar to Parshant's suggestion, but without overriding the component.
Freemarker allows you to assign a block of markup by using opening and closing assign directives instead of self-closing. Once you've assigned the markup to a variable, you can then use Freemarker built-ins to test the content.
For example, you could do something like:
<#assign componentOutput>
<@component id="solutions.widget.accepted-solutions-leaderboard-taplet"/>
</#assign>
<#if componentOutput?? && componentOutput?length gt 0>
<h3>Your component title</h3>
${componentOutput}
</#if>
I've not tested this exact code, but it should get you close.
You are using the wrong syntax for if else. As <#else> is in existing directive, but the tag is malformed. So you need to use <#else> instead of </#else> Try this one
<#if page.name == "UserProfileRedirect">
<#assign redirect_url = "/" />
<#attempt>
<#if user.registered && user.registration.complete == false>
<#assign redirect_url = webuisupport.urls.page.name.UserSsoRegistrationPage.build() />
<#else>
<#assign redirect_url = webuisupport.urls.page.name.ViewProfilePage.path("user-id",user.id?string).build() />
</#if>
<#recover>
</#attempt>
${http.response.setRedirectUrl(redirect_url)}
</#if>
TariqGrazitti wrote:
Here is an API call to update the user avatar, you will need to create a script which will loop through all the users and will update avatar for each.
Also, you need to create a mapping logic which will return you new avatar corresponds to old one.
Thanks
Tariq Hussain
It turned out that it was a lot simpler than what we were thinking: it is possible to simply delete the old version of the avatar and upload a file with the exact same name.