I'm trying to insert a macro-call into several tiddlers through 
stylesheets, such that the macro is processed/called within the tiddler it 
has been parsed into.
Specifically, I'm trying to add a call to my custom TOC macro at the end of 
all tiddlers tagged with TOC.

However, it does not work. I can call my macro inside tiddlers with 
*<$macrocall 
$name="mytoc" category={{!!title}}/> *and it works fawlessly. But I'm 
unable to "inject" it with CSS. 
What am I missing?



my code:

*$:/macros/mytoc *(tagged $:/tags/Macro )
\define mytoc(category)
    <div class="tc-custom-toc">
        <div class="tc-table-of-contents">
            <<toc-selective-expandable tag:"""$category$""" sort:
"""sort[title]""">>
        </div>
    </div>
\end


*$:/custom_styles *(tagged $:/tags/Stylesheet and of type 
text/vnd.tiddlywiki)
(this simply applies a box shadow to my TOCs)
<pre> .tc-custom-toc {
    border-radius: 4px;
    padding: 5px 10px;
    border: 1px solid <<colour message-border>>;
    <<box-shadow "2px 2px 10px rgba(0, 0, 0, 0.5)">>
} </pre>


*$:/custom_styles2 *(tagged $:/tags/Stylesheet and of type text/css)
(This should add the TOC macro call to all tiddlers tagged with "toc")
.tc-tagged-toc .tc-tiddler-body:after {
    content: '<$macrocall $name="mytoc" category={{!!title}}/>';
}




-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ce605a91-21c3-49f8-8598-a4a5b6098304%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to