\define pff-display-xblock(field:"" prefix:"")<$list filter='[is[current]has[$field$]]'>$prefix$<$transclude field="$field$" mode="block" /></$list>\end
<<pff-display-xblock "test" "prefix">>
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6a943130-ccb4-4d24-ad07-017c8688a5b6%40googlegroups.com.
<prefixtest.PNG>
It may be worth trying to use CSS float: left to position the prefix?
\define pff-display-xblock(field:"" class:"")
<$list filter='[is[current]has[$field$]]'>
<div class="myclass $class$">
<$transclude field="$field$" mode="block" /></div>
</$list>
\end
<<pff-display-xblock "caption" "xxx">>
<style>
.myclass { margin-left:2em;}
.xxx::before {content:"xxx"; position:absolute; margin-left:-2em}
</style>
This, and Reeces other similar "block issues" caused from transclusion blockmode, are interesting. Maybe the transclusionwidget should have a class attribute?
Reece, here's an alternative solution that might work IF you prefix is a string that fulfills common css definition name rules.
\define pff-display-xblock(field:"" class:"")
<$list filter='[is[current]has[$field$]]'>
<div class="myclass $class$">
<$transclude field="$field$" mode="block" /></div>
</$list>
\end
<<pff-display-xblock "caption" "xxx">>
<style>
.myclass { margin-left:2em;}
.xxx::before {content:"xxx"; position:absolute; margin-left:-2em}
</style>The prefix you use in the macrocall (i.e "xxx") has a corresponding styledefinition (i.e ".xxx").<:-)
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/173911ac-375d-46a3-adad-9e69f39d1eb3%40googlegroups.com.
Hi MatThis, and Reeces other similar "block issues" caused from transclusion blockmode, are interesting. Maybe the transclusionwidget should have a class attribute?The transclude widget doesn’t generate any DOM elements itself, and so there would be nowhere to attach the class.
But this is more of an HTML issue, I think: there’s no facility for injecting content into a block other than float, as far as I know.Best wishesJeremy.
Reece, here's an alternative solution that might work IF you prefix is a string that fulfills common css definition name rules.
\define pff-display-xblock(field:"" class:"")
<$list filter='[is[current]has[$field$]]'>
<div class="myclass $class$">
<$transclude field="$field$" mode="block" /></div>
</$list>
\end
<<pff-display-xblock "caption" "xxx">>
<style>
.myclass { margin-left:2em;}
.xxx::before {content:"xxx"; position:absolute; margin-left:-2em}
</style>The prefix you use in the macrocall (i.e "xxx") has a corresponding styledefinition (i.e ".xxx").<:-)--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.