Newbie question regarding templates and widgets

Ok, so I’m really new here so hi!

My question is, is there a more robust way to know what variables and other things to use. Such as, I want to create a dynamic Table of Topics that lives at the top of my Index page. Basically, very similar to a Table of Contents but only lists the pages with the #topichead tag that I’ve put into the frontmatter section of specific pages.

My issue is getting it to only apply to the Index page. I seem to not know the sequence of of words to be able to search what I’m looking for.

So, is there something where I can have something like this:

hooks.top:
where: page.name = “Index”

Or am I over complicating this. Is there something already existing?

Thank you so much for y’alls time!

Since you want something to just be present on a single page, I don’t see a downside in defining it in this page’s content. I would define it with a Live Query, putting this at the start of the index page:

## Table of Topics
```query
topichead
render each [[Library/Core/Query/Page]]
```

A quick example of how it looks for me, after tagging “Topic A” and “Topic 1” pages with #topichead

Would that solve your use case? I agree that some parts are not obvious at the start, but that’s why we have the forum :slight_smile:

1 Like