Whats are the selectors called and how to find them? page.title etc

What is the name of selectors such as page.url, page.header.title, etc and how do I find a list of valid ones? (like a reference page - its hard to find when I dont know what they are called).

I am trying to get the page description in the search results for simplesearch. The default is “page.content |raw” but this renders the contents of the page in the results but I only want a one line description.

Im trying to migrate my site to Grav so Im new to twigs, markdown etc…
Thanks in advance!

Graham.

Define description in your case. If it’s a separate field for the page and it actually has such name, then it would be page.description

I had tried this previously, and page.meta.decription. The results pages both have descriptions but it is not being displayed. page.url works, just not the description.

You need to check that page blueprint to see how it’s actually called in code

from the blueprints? The meta data is imported from metadata.html.twig? Ive searched the blueprints and no description…

I think we’re going in circles here and too much information is missing…

What do you mean by one line description? How do you set it?

Im after trying to get the content of to show as the result. I see now that its set globally for the whole site, which I will have to sort. But is there a way just to get the value of content output i.e. “foo” in this instance

Once again - not enough info. All I can suggest for now:

It was cutting out my code snippets, sorry, new to this…

<meta name="description" content="foo.">

I want “foo” returned on the page.

I’ll keep searching…

This should be in the page.metadata.description, unless it’s implemented somehow differently on your page

@Grayches, Have you had a chance to read the docs?

And also maybe The art of asking great questions? Your answer is short of information as @Karmalakas has pointed out…

While reading the docs, pay special attention to:

I have read the docs and Im referencing them all the time. Still takes time to get your head around things and this answer is not there regardless.
My initial question was just for the name of the variable type from which I could of found the answer.
As explained in previous post my code was omitted but as you can see from my later post this is not a custom tag. Its a standard html meta tag.

They are just configuration options or configuration variables. I very much doubt you will find anything useful if searching for that.


Then, as I already said, page.metadata.description

This worked along with |join(' ') tagged on the end. Its seeing it an array for some reason. Thanks for your help.

Sounds like something is wrong in your configs :thinking:

Yeah, I’ll have to look into that… :pensive: