Forum

Thread tagged as: Question, Problem

Can I have templates in Layouts?

I'm brand new to perch. I am in the middle of converting this site to a perch site.

I created a global layout for the top of my pages. Within this layout I wanted to have editable regions. Specifically, the buttons for reservations, quotes and the itunes app need to be editable. Also, the to right icons for phone, email and social media need to be editable.

I created the template for the regions, I added a perch content tag to the global layout, but when I view a page, I don't see the region listed on my page. So, I know I've done something wrong. But I don't know what.

How can I accomplish this?

Kim Mazzola

Kim Mazzola 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That should be fine - I think you're going about it in the right way. Have you loaded the page up in your browser to create the region?

Thank you for responding so quickly. I did load the page to create the region. I'm developing locally and I think the connection with my DB is slow or something because after logging out, closing the DB connection, and then restarting everything the region was there and I was able to edit it. I also found if I have a typo in any template and correct that, the corrections do not show in real time either. Is this normal?

At times I've gone into the DB and manually updated the content.

But, after logging back in the region was there and I was able to add my content.

Thank you.

Drew McLellan

Drew McLellan 2638 points
Perch Support

PHP will internally cache your files so changes won't show immediately. Make sure you're in development mode so Perch can counteract it for you.

In your config.php file:

 define('PERCH_PRODUCTION_MODE', PERCH_DEVELOPMENT);

Thank you. I just add that line to the config file at the end?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that would be fine.