Jahia Dev Forum > adding a css file...

0 (0 Good)
0 (0 Bad)

adding a css file in edit mode

by  rusashi »  2013/01/27 12:26

Hi guys.

I know how to add a css file to a template set and this css file will be applied to a website which is base on that template. But is it possible to add a css file in Edit Mode? And is it possible to respond automatically to changes in that file?

Thank you. 

  • adding a css file in edit mode
    2013/01/27 12:26

    rusashi <p> Hi guys.</p> <p> I know how to add a css file to a template set and this css file will be applied to a website which is base on that template. But is it possible to add a css file in Edit Mode? And is it possible to respond automatically to changes in that file?</p> <p> Thank you.&nbsp;</p>

  • Number of messages  8
    Registration date Jan 27, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: adding a css file in edit mode

    by  rvt »  2013/01/31 12:31

    This is done very easy,
    here is such a snipped:

     

    <c:if test="${not renderContext.editMode}">

    <template:addResources type="css" resources="reset.css" />

    </c:if>

    <template:addResources type="css" resources="init.css, style.css" />

     

    <c:if test="${renderContext.editMode}">

    <template:addResources type="css" resources="edit.css" />

    </c:if>

  • Re: adding a css file in edit mode
    2013/01/31 12:31

    rvt <p> This is done very easy,<br /> here is such a snipped:</p> <p> &nbsp;</p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; "> <span style="color: #009193">&lt;</span><span style="color: #4e9192">c:if</span> <span style="color: #932192">test</span>=&quot;${<span style="color: #931a68">not </span>renderContext.editMode}&quot;<span style="color: #009193">&gt;</span></p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 145, 146); "> <span style="color: #009193">&lt;</span>template:addResources<span style="color: #000000"> </span><span style="color: #932192">type</span><span style="color: #000000">=</span><span style="color: #3933ff">&quot;css&quot;</span><span style="color: #000000"> </span><span style="color: #932192">resources</span><span style="color: #000000">=</span><span style="color: #3933ff">&quot;reset.css&quot;</span><span style="color: #000000"> </span><span style="color: #009193">/&gt;</span></p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 145, 146); "> <span style="color: #009193">&lt;/</span>c:if<span style="color: #009193">&gt;</span></p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(57, 51, 255); "> <span style="color: #009193">&lt;</span><span style="color: #4e9192">template:addResources</span><span style="color: #000000"> </span><span style="color: #932192">type</span><span style="color: #000000">=</span>&quot;css&quot;<span style="color: #000000"> </span><span style="color: #932192">resources</span><span style="color: #000000">=</span>&quot;init.css, style.css&quot;<span style="color: #000000"> </span><span style="color: #009193">/&gt;</span></p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px; "> &nbsp;</p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; "> <span style="color: #009193">&lt;</span><span style="color: #4e9192">c:if</span> <span style="color: #932192">test</span>=&quot;${renderContext.editMode}&quot;<span style="color: #009193">&gt;</span></p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 145, 146); "> <span style="color: #009193">&lt;</span>template:addResources<span style="color: #000000"> </span><span style="color: #932192">type</span><span style="color: #000000">=</span><span style="color: #3933ff">&quot;css&quot;</span><span style="color: #000000"> </span><span style="color: #932192">resources</span><span style="color: #000000">=</span><span style="color: #3933ff">&quot;edit.css&quot;</span><span style="color: #000000"> </span><span style="color: #009193">/&gt;</span></p> <p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(78, 145, 146); "> <span style="color: #009193">&lt;/</span>c:if<span style="color: #009193">&gt;</span></p>

  • Number of messages  185
    Registration date Jan 31, 2013
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page