Hi,
I am writing a macro which based on a condition it should "call" the HTML macro with a paramater.
The end goal (as I guess that there is another way to achieve what I need) is to create an open div.
Basically output shoud be <div id = $paramX>
however currently when i look at page source the div is automatically closed which i why I was looking at calling the HTML macro where having an open div is possible.
Many thanks for our help (i am totally new to all this macro stuff)
I would ask why you want an open div tag?
But you don't need to call the HTML macro. A simple user macro will work, where:
## @param divID:title=Div ID
<div id = $paramdivID>
No I am not sure what will happen you place the macro. I assume it will just close the div tag immediately (i.e., you won't be able to place any content inside the div).
What I suggest is a wrapper macro where you place to the content you want to wrap inside the macro. Your new macro would be:
## @param divID:title=Div ID
<div id = $paramdivID>$body</div>
This will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is an article I wrote sometime back that talks about a more sophisticated wrapper macro, to give you more ideas:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.