Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All toc macros should accept current tiddler as default tag parameter #8289

Closed
springerspandrel opened this issue Jun 22, 2024 · 2 comments · Fixed by #8291
Closed

All toc macros should accept current tiddler as default tag parameter #8289

springerspandrel opened this issue Jun 22, 2024 · 2 comments · Fixed by #8291

Comments

@springerspandrel
Copy link
Contributor

springerspandrel commented Jun 22, 2024

Is your feature request related to a problem? Please describe.
As noted in this discussion, It would be more consistent with other macros, such as tag macro, if toc macros (the whole family of them) defaulted to showing toc for the current tiddler whenever no parameter is specified. This kind of "toc-starting-here" is convenient in projects where the "home" node for each tags serves as an important (view-template enhanced) hub for information related to that tag. An intuitive view template for this purpose should not need anything more than <<toc>> (or <<toc-selective-expandable>>, etc.) to make a table of contents based on the current location as a tag home.

Describe the solution you'd like
This whole family of macros (<<toc>> <<toc-expandable>> <<toc-selective-expandable>> <<toc-tabbed-internal-nav>> <<toc-tabbed-external-nav>>) should all treat the current tiddler as the default tag value, if no parameter is specified.

Describe alternatives you've considered
Constructing a macro call with filter language to specify current tiddler as the tag parameter, so that a view template could add a toc within any tiddler which has tag-children. (It's not intuitive, and I wouldn't want to explain it to a beginner! But this should be a beginner-friendly feature to add.)

@Jermolene
Copy link
Member

Thanks @springerspandrel that seems reasonable, it is probably one for @pmario

@pmario
Copy link
Member

pmario commented Jun 23, 2024

I'll have a closer look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants