# Index of pages without a specified tag

**URL:** <https://community.silverbullet.md/t/index-of-pages-without-a-specified-tag/2119>\
**Category:** Tricks & Techniques\
**Created:** [April 4, 2025, 12:03pm UTC](https://community.silverbullet.md/t/index-of-pages-without-a-specified-tag/2119 "2025-04-04T12:03:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthillsocial](https://community.silverbullet.md/user_avatar/community.silverbullet.md/anthillsocial/32/1137_2.png) [@anthillsocial](https://community.silverbullet.md/u/anthillsocial)\
**Post date:** [April 4, 2025, 12:03pm UTC](https://community.silverbullet.md/t/index-of-pages-without-a-specified-tag/2119/1 "2025-04-04T12:03:03Z")

</div>

I have added this example because I cannot see an equivalent in the documentation for Lua template queries. I also have a few questions:

- I feel I could be missing a more elegant way to display an index of pages (with tags) **not tagged** “meta” etc?
- How can I add a custom CSS class to the resulting list or a parent block?
- Is there a recommended way to render the tags as links rather than plain text (via table.concat) which is the current output?

```auto
${template.each(query[[
select{
    name = p.name,
    modified = p.lastModified,
    tags = p.tags
  }
from p = index.tag "page"  
where not table.includes(p.tags, "meta")
]], 
template.new[==[
    * [[${name}]] ${table.concat(tags, ",")}
    ]==]
)}

```

---

<div class="post-metadata">

**Author:** ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)\
**Post date:** [September 29, 2025, 12:50pm UTC](https://community.silverbullet.md/t/index-of-pages-without-a-specified-tag/2119/2 "2025-09-29T12:50:32Z")

</div>

i know it’s been a while but i stumbled uppon your post searching for something else.  
here is the answer or a workaround for your 3rd question regarding the tags.  
not the most elegant way of doing things but it work, i will just leave this here to someone who might be asking the same:

```auto
${template.each(query[[
select{
    name = p.name,
    modified = p.lastModified,
    tags = p.tags
  }
from p = index.tag "page"  
where not table.includes(p.tags, "meta")
limit 10
]], 
template.new[==[
    * [[${name}]] ${tags and #tags >0 and "#" .. table.concat(tags," #") or ""}
    ]==]
)}

```

this will give you a list with clickable pages and tags:

 ![image](https://community.silverbullet.md/uploads/default/original/2X/d/d1fc8691ba37393242cc2395ee2577c810e8db4e.png)

---

<div class="post-metadata">

**Author:** ![anthillsocial](https://community.silverbullet.md/user_avatar/community.silverbullet.md/anthillsocial/32/1137_2.png) [@anthillsocial](https://community.silverbullet.md/u/anthillsocial)\
**Post date:** [September 30, 2025, 8:50am UTC](https://community.silverbullet.md/t/index-of-pages-without-a-specified-tag/2119/3 "2025-09-30T08:50:31Z")

</div>

Great - thanks for that!
