1

I was wondering if it is possible to create a SEO Title Source in SEOmatic where the page title is output and then the parent/section page title e.g.:

{entry.title} | {{ entry.parent.title }} | Company Name

(The entry.title works but am not sure if its possible to get a parents page title)

Thanks Malcolm

2

Yep, you should definitely be able to do what you want.

What I do is I test the code in the actual Twig template used to display the page, and then once I have it working, I paste it into the SEOmatic field, and add object. in front of the entry.

e.g.: If this gives you the results you want in the template:

{{ entry.title }} | {{ entry.parent.title }} | Company Name

Then when you paste it into SEOmatic's CP fields, it'd look like this:

{{ object.entry.title }} | {{ object.entry.parent.title }} | Company Name

I find that this makes it easier to debug.

| improve this answer | |
  • Thanks Andrew thats really great answer and helps a lot – user2350248 Jun 15 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.