Hello,
With wiki syntax I failed to insert a simple span in a velocity macro (Blog./BlogCode):
#macro(publishMessageBox $message)
(% class="plainmessage publish-message" %)((($message)))
#end
display:
<div class="plainmessage publish-message">
<p>This article was published on 17/10/2016 16:47:06</p>
</div>
and I want a span in front of $message like this:
<div class="plainmessage publish-message">
<p><span class="glyphicon glyphicon-globe"></span> This
article was published on 17/10/2016 16:47:06</p>
</div>
Is it possible (I can not use {{html}} because code is escaped)?
Here my test and what is displayed:
(% class="plainmessage publish-message" %)((((% class="glyphicon
glyphicon-globe" %)((( )))$message)))
display
<div class="plainmessage publish-message">
<div class="glyphicon glyphicon-globe"></div>
<p>This article was published on 17/10/2016 16:47:06</p>
</div>
=> With div instead span it is ok BUT there are <p> inserted :-( !
(% class="plainmessage publish-message" %)((((% class="glyphicon
glyphicon-globe" %)$message)))
<div class="plainmessage publish-message">
<p>
<span class="glyphicon glyphicon-globe">This article was published on
17/10/2016 16:47:06</span>
</p>
</div>
=> span inserted BUT I don't want end of span at the end of the $message
(% class="plainmessage publish-message" %)((((% class="glyphicon
glyphicon-globe" %)((())) $message)))
<div class="plainmessage publish-message">
<div class="glyphicon glyphicon-globe"></div>
<p>This article was published on 17/10/2016 16:47:06</p>
</div>
=> With div instead span it is ok BUT there are <p> inserted :-( !
Have you got a solution?
Thxs
Pascal B
Show replies by date