How to get to title of a StaticPage from rainlab Static Pages plugin?

Hi there,

I am wondering how to get to a staticpages title ? I know I cant get url doing that:
{{ ‘my_static_page_name’|staticPage }}, but how to get it’s title?

Thanks for helping me out,

If I correctly understood the question:

Desired parameter You can look in Twig debug functions d

{{d(this.page)}} - all

or specific parameter

{{d( this.page.meta_title, this.page.title, this.page.url, this.page.meta_description)}}

Thanks a lot,

I know “this.page” syntax, but I’m trying to build links pointing to my static pages, so I would like to access it before I’m on the page itself like in the example below.
I need something like myStaticPage1.title or myStaticPage1|title in the same way staticPages have their URLs constructed - this works great, {{ myStaticPage|title }},
Any ideas ? Hope the example explains the situation

          <ul class="nav flex-column">
            <li class="nav-item"><a href="{{ 'myStaticPage1'|staticPage }}" class="nav-link-footer" alt="{{ myStaticPage|title }}">{{ myStaticPage.title ?  }}</a></li>
            <li class="nav-item"><a href="{{ 'myStaticPage2'|staticPage }}" class="nav-link-footer" alt="{{ myStaticPage.title ?  }}">{{ 'myStaticPage.title }}</a>
            </li>
          </ul>

You can add a static menu component to the template and pass its array to the partial.
Or use this array directly in the template.

If you want to manage data through a filter (| filter ) - need to create it in your Plugin.php

Thanks a lot :slight_smile:
Menu should do for now, I’ll look into plugins later