Forum Discussion

tmarshall's avatar
tmarshall
Advisor
9 years ago

FreeMarker Novice - Making two rest calls in custom component

I'm new to developing and using FreeMarker. I'm learning and reading the various samples and figured out how to reference items in an API call. I'm getting stuck trying to reference a rest call to a ...
  • tmarshall's avatar
    tmarshall
    9 years ago

    Thanks, but that is a bit overwhelming for a novice. I went over my question with my boss and came up with the following below. Since the title didn't exist in the API call I was making I needed to reference another AP call. This was my original question. You can see that we can reference another rest call and concatenate the title to get the board title.

     

    <#list rest("/boards/id/[foo]/solutions/recent?page_size=10&response_style=view").threads.thread as thread>			<li> 
    				<a href="${thread.solutions.solution?first.@view_href}">${thread.messages.topic.subject}</a> <br /> 
    				<a href="${thread.board.@view_href}"> ${rest(thread.board.@href + "/title").value} </a> <br /><br />
    			</li>
    		</#list>