2009/3/2 The Editor <[email protected]>:
> Was one of the things I was wrangling with endlessly... Change
> markups.php ~87-93 to:
>
> function BOLTMsnippets($var, $page='') {
> $out = BOLTdomarkup(BOLTsnippets($var, $page, $skin));
> if (strpos($out, "\n") === false) {
> if (substr($out, 0, 3) == '<p>' && substr($out, -4) == '</p>')
> $out
> = substr($out, 3, -4);
> }
> return BOLTescape($out);
> }
>
> No guarantee it won't break something else... :)
Thanks Dan! This fixed the rendering of snippets vars in the skin
template. But it broke the rendering of snippets vars in the text.
Maybe I should use a different syntax for such vars when used in main
content? I was using for instance the background markup:
[(background id=top bg="url($$img/clouds.jpg)")]
This worked before, but now the style is rendered as
#top { background: url(~~62~~/clouds.jpg); }
Obviously if a snippet var is used in text it should not go through
BOLTescape, but usin git in skin template it seems to need BOLTescape.
Or do i misunderstand the use of these template variables, is there
another way to use them in main content?
Looking at the function I like to express some concern about the use
of $skin. If the skinpath should be used as $$skin in the template,
what is $skin in php, and what is the variable for skin name I can use
in a template? I find it a bit muddled, making $$skinpath, which is
clear and a path, into $$skin, which now could mean various things.
thanks,
~Hans
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---