Forum
use perch_pages_title in region
Hi, Maybe a stupid question. But is it possible to use the perch_pages_title function in a region?
If not can i use perch:content id="landheading" from region "heroimages" in region "Reisorganisaties"? So a don't have to at the country name twice.
<perch:before>
<h2>Reisorganisaties <?php perch_pages_title(); ?> </h2>
<div class="reisorg_slider">
</perch:before>
<div class="reisorg_item">
<div class="logoreisorg">
<a href="https://<perch:content id="url_reisorg" type="text" label="Link naar aanbieder" replace="https://|" />" rel="nofollow" target="_blank" onclick="trackOutboundLink('<perch:content id="url_reisorg">'); return false;">
<img src="<perch:content type="image" id="logo_reisorg" label="Image" bucket="logo_reisorg" height="130" />" alt="<perch:content type="text" id="alt" label="Alt tekst image, vul naam reisorg in" required="true" title="true" />" >
</a>
</div>
<div class="hidden">
<div
class="title"><perch:content id="naam_reisorg" type="text" label="Naam reisorganisatie" required="true" title="true" />
</div>
<div
class="long"><perch:content id="beschrijving_reisorg" type="textarea"label="Beschrijving reisorganisatie" html="true" editor="ckeditor" size="m" />
</div>
</div>
</div>
<perch:after>
</div>
</perch:after>
You can just pass it into template like this
https://docs.grabaperch.com/templates/passing-variables-into-templates/
Thx for your answer,
I try to use it but it dont't work.
Where do i put
In template/content/reisorganisaties.html
Or in template/pages/land.php
This are the to files i use
And the region template
What I gave you is .php code, so you would place it in your .php file, but it must be placed before the region. Also you will need to use perch_content_custom() in place of perch_content(). Last you need to add the hidden tag to your template where you want this output.
I think I provided a link to documentation?
:)