href path difference between component and endpoint
Hi,
Im trying to (re)load the idea's dynamicly with AJAX.
<#assign max_image_width = settings.name.get("layout.message_body_image_max_size", "1000") /> <#assign image_resize_css = "lia-message-body-content" /> <#assign statusUpdates = rest("2.0","/search?q=" + "SELECT * FROM messages WHERE conversation.style='idea' and depth=0 limit 15"?url)/> <#if statusUpdates.data?has_content> <#list statusUpdates.data.items as message> <#assign rest_call = "rest_2.0:/messages/${message.id}" /> <div class="idea-tile idea-${message.id}" > <@component id="ideas.widget.idea-message-view" message=rest_call maxWidth=max_image_width resizeCss=image_resize_css /> </div> </#list> </#if>
This show the idea widgets with the ability to give kudo to it.
When i run this from my component, it works great.
When i put it in an endpoint to enable some AJAX functionality all href links go to a 404.. corrupted links
- go to detailpage of idea = corrupted
- give/revoke kudo = corrupted
- etc etc.. all 'forwarded' links = corrupted/bad/wrong
For example the kudos result :
Examplecode in the Component:
href=https://community.lithium.com/t5/ideas/v2/ideaexchangepage.kudosbuttonv2.kudoentity:kudoentity/kudosable-gid/5481?t:ac=blog-id/idea-suggestions&t:cp=kudos/contributions/tapletcontributionspage
200 - OK
Examplecode in the Endpoint, which is called by the Component:
href=https://community.lithium.com/[communityname]/components/componentdisplaycontributionpage.kudosbuttonv2.kudoentity:kudoentity/kudosable-gid/5481?t:cp=kudos/contributions/tapletcontributionspage
404 - error
Is there a way of giving the right 'base' path to an endpoint?