Skip to content


Subversion checkout URL

You can clone with
Download ZIP


<sitemesh:write property=""> not being parsed inside element attributes #23

atomi opened this Issue · 5 comments

4 participants


<body id='<sitemesh:write property="" />'>
<input id='' type='hidden' value='<sitemesh:write property="">' />
<body id="<sitemesh:write property='' />">

I'm unable to get these to work in sitemesh3 using a .gtpl or .html decorator.


Example 2 works for me. I will work on 1 and 3, but for now, use javascript after the body tag inside the decorator to set the id and class on the body using Example 2.

aka = document.getElementById('');


I don't any code with the examples, is this still an issue?


I would guess so. There haven't been any updates since this was reported.

Edit: It looks like github decided not to parse the code examples as markdown anymore.
I went ahead and encoded the html chars.


Here is my code (It has been working flawlessly for almost a year now...):

<input id="" type="hidden" value="<sitemesh:write property="" />"/>
<input id="meta.body.class" type="hidden" value="<sitemesh:write property="body.class" />"/>
<script type="text/javascript">
    var bodyClass = document.getElementById('meta.body.class').value;
    var bodyId = document.getElementById('').value;
    if (bodyId) { = bodyid;
    if (bodyClass) {
        document.body.className = bodyClass;
@musketyr musketyr referenced this issue from a commit
@musketyr musketyr test for #23 26f1f42

fyi example 2 works well if you close the tag properly. <sitemesh:write property=""/>

@codeconsole codeconsole closed this in #49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.