0

background: i am using javascript templates, which i would like to output raw, without tumblr replacing code matching their api variables

example: i would like to literally output {Title} in the html, this is normally replaced by tumblr's html api as it is an api keyword, but usually templating systems have a raw/escape/unescape block functionality. This is not documented, but a lot of their functionality isn't either, such as the {host} tag.

2 Answers 2

0

ok so i found one way of doing it, exploiting the fact that tumblr does not support spaces in it's variable declarations: { title } does not get replaced, {title} does

0

According to http://blog.post-theory.com/post/18173369734/tumblr-theme-limitations-when-a-block-doesnt-exist, you can do:

if ( [ {JSLinkUrl} ].length && [ {JSLinkUrl} ][0] ) {
    document.write('<a class="foo" title="bar" href="' + encodeURI( {JSLinkUrl} ) + '"></a>');
}

So I can guess that {JSTitle} Should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.