Thank you for your incredibly fast reply!
I tried as you suggested, but still no luck. I've included a new macro
(mytoc2) rigth into the stylesheet, as well as the above rules, with no
luck. I've tried to call in within the "content" section as well as a
direct call to it. Still no luck.
tagged $:/tags/Stylesheet
\rules only filteredtranscludeinline transcludeinline macrodef
macrocallinline
\define mytoc2(category)
<>
\end
.tc-tagged-toc .tc-tiddler-body:after {
content: '<$macrocall $name="mytoc2" category={{!!title}}/>';
}
On Tuesday, April 24, 2018 at 12:10:38 PM UTC+2, Jeremy Ruston wrote:
>
> Hi Andres
>
> Does your stylesheet include the following pragma at the top?
>
> \rules only filteredtranscludeinline transcludeinline macrodef
> macrocallinline
>
>
> If so, the problem will be that the list of allowed rules doesn't include
> the rule that understands widget calls like you <$macrocall> widget.
>
>
> The cleanest way around this would be to put your macrocall widget into a
> macro at the top of the stylesheet tiddler, and then invoke it in your
> :after declaration (the rules pragma above allows the macro invocation
> syntax).
>
>
> Best wishes
>
>
> Jeremy
>
> --
> Jeremy Ruston
> jer...@jermolene.com
> https://jermolene.com
>
> On 24 Apr 2018, at 11:03, Andres Gongora <gongo...@gmail.com >
> wrote:
>
> 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)
>
>
> < """sort[title]""">>
>
>
> \end
>
>
> *$:/custom_styles *(tagged $:/tags/Stylesheet and of type
> text/vnd.tiddlywiki)
> (this simply applies a box shadow to my TOCs)
> .tc-custom-toc {
> border-radius: 4px;
> padding: 5px 10px;
> border: 1px solid <>;
> <>
> }
>
>
> *$:/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+...@googlegroups.com .
> To post to this group, send email to tiddl...@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
>
> <https://groups.google.com/d/msgid/tiddlywiki/ce605a91-21c3-49f8-8598-a4a5b6098304%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
--
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/12106ab2-cb15-45da-a963-bdb5d2ce70fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.