cancel
Showing results for 
Search instead for 
Did you mean: 

Example of how to use @markup tag?

pjaromin
Champ on-the-rise
Champ on-the-rise
I'm searching in vain for anything on how I might add content to the resources.get.html.ftl section:

<@markup id="resources">
   <#– Use this "markup id" to add in a extension's resources –>
</@>

I've read through blog posts and docs about it, and I've used the techniques in the @region tutorials, but don't see how to use the @markup and learning Surf through debugging has been incredibly time consuming. It seems clear from the way the docs are written that this is quite obvious to those with extensive Surf and/or FreeMarker exposure. Unfortunately I'm far more familiar with Spring/JSP/Java.

Any pointers would be greatly appreciated!

Thanks!

-Patrick
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

@markup is used in (almost) the same way as @region. Using a Surf extension module and a <customization> element, another webscript template can add / replace content of the @markup segment just by specifying
<@markup id="myResources" target="resources" action="after"></@markup>
e.g. from your custom resources.get.html.ftl mapped via source and target packages in the <customization>.
The major difference in @region and @markup is, that @region supports component bindings and @markup doesn't.

Regards
Axel

pjaromin
Champ on-the-rise
Champ on-the-rise
I managed to get this working without too much trouble following your response after spinning my wheels for some time last week, so thanks, Axel!

For anyone else in the same position, I found this David Draper post helpful for the <customization> tag.

Thanks!

-Patrick