Hi,
I wrote a "User Macro" to add links with some options.
In the user macro is a link with the HTML attribute "target", but if I'm using the user macro, the "target" attribute is missing.
What is my fault?
SIMPLIFIED user macro CODE (there is much more code in the user macro)
## @param Target:title=How to open the link|type=enum|enumValues=New,Current|default=Current Window|desc=Defines how the link will be opened.
#if( $paramTarget == "New" )
#set( $target = "_blank" )
#else
#set( $target = "_self" )
#end
<a href="http://www.google.com" target="$target" data-target="$target">Google</a>
The "target" attribute is set correct, see the "data-target" attribute.
The HTML source code resulting in
<a href="http://www.google.com" data-target="_self" class="external-link conf-macro output-inline" rel="nofollow" data-hasbody="false" data-macro-name="av-test-macro-code">Google</a>
I knew the workaround "adding javascript code to add the target attribute based on the external-link class".