Forum
Blog post title not showing in block
I'm using perch blocks within the post template of the blog. I'm trying to call in the postTitle
For example:
<h5><perch:blog id="postTitle" type="text"/></h5>
However the template shows nothing.
This works fine outside of the repeater:
<h1><perch:blog id="postTitle" type="text" /></h1>
Is there a limitation preventing the postTitle from being included in a repeater within a block?
Hello Tony,
The documentation discusses accessing content from outside the repeater: https://docs.grabaperch.com/templates/repeaters/
I'd tried that technique and it didn't work
For the record I have this working perfectly fine within a standard page, it's only within the blog templates it doesn't work.
Fixed it - passing a variable into the template and not using the parent. syntax works.
Then to get the blog-title in the repeater in the repeater.
Seems like I'm missing something obvious here but that's a lot of code to access a page title?
I think it's because you have 2 levels here so you have to add
scope-parent
to bothperch:blocks
andperch:repeater
:p.s. try avoiding hyphens in your IDs:
https://docs.grabaperch.com/templates/attributes/id/
Thank you so much for posting the content here at the platform. I would also like to share important info on visit: https://www.downloadaoldesktopgoldshield.com/