Skip to content

subpage.title not returning value #274

@tourbino

Description

@tourbino

Hi! Thanks for this plugin.

I'm trying to make a simple linkable dynamic list of a folders content, to embed in a page. I'm trying this script:

<ul>
{% for subpage in page.children %}
    <li><a href="{{ subpage.file.name }}/">{{ subpage.title or subpage.file.name }}</a></li>
{% endfor %}
</ul>

But the list only displays the subpage file name, not the title. Using frontmatter

---
title: mypagetitle
---

didn't make a difference from simply starting the .md with # mypagetitle .

I also tried different variants of child.page, but that didn't work either.

I'm quite sure I'm in the wrong here, and it might be wrong of me to use the "issues" feature. If so, I apologize.. how can I get the subpage title?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions