Reputation: 6006
I have written a confluence macro. It uses velocity to generate html table. How can I style this markup with css if I don't use <html>
and <head>
tags in my velocity model. I have tried to do as in this example but id doesn't work(I mean it takes no effect and there is no css resource file that I have specified inclusion on the code of result page of macro)
Upvotes: 0
Views: 975
Reputation: 1779
if i understand you correctly
you need to add links on your css files to atlasian-plugin.xml
for example
<atlassian-plugin name='Just name' key='com.your.path.to.lib'
plugins-version="2">
<resource type="download" name="style.css" location="css/style.css">
<property key="content-type" value="text/css"/>
</resource>
</atlassian-plugin>
after that you need to add this link to the top of your velocity template
<link rel="stylesheet" href="$req.contextPath/com.your.path.to.lib/style.css"
type="text/css"/>
Upvotes: 1