Forum
Redisplaying snippets from another page
Hi,
I have a page which contains news and offers:- https://www.feelgood-factor.co.uk/newsoffersfgfwithcms.html
Here is the template for the capture of the Latest Offers section:-
<li class="">
<h4>
<perch:content id="monthheading" type="text" label="Offer Heading" textile="true" editor="markitup" maxlength="150" />
</h4>
</li>
<li class=""><perch:content id="monthtext" type="text" label="Offer Text" textile="true" editor="markitup" /></li>
<li class="">
<div class="separator"></div>
</li>
I want to display snippets of the latest offers on the home page so I am trying to use perch_content_custom on page:- https://www.feelgood-factor.co.uk/indexwithcms.html
the include is this:-
<?php
perch_content_custom('monthoffers', array(
'page'=>'newsoffersfgfwithcms.html',
'template'=>'_homemonthlyoffers.html'
));
?>
and the template is this:-
<span class="dish_title"><br style=""/>
<perch:content id="monthheading" type="text" label="Offer Heading" textile="true" editor="markitup" maxlength="150" />
</span>
<p class="dish_description">
<perch:content id="monthtext" type="text" label="Offer Text" textile="true" editor="markitup"
</p>
Where am I going wrong?
Thanks Karen
What problem are you encountering?
It isn't displaying the content see: https://www.feelgood-factor.co.uk/indexwithcms.html
I was trying for the latest two 'Latest Offers' to be displayed in the Special Offers section but nothing is being displayed.
If you turn on debug for the page, what does it output?
https://docs.grabaperch.com/docs/installing-perch/configuration/debug/
define('PERCH_DEBUG', true); Fatal error: Class 'PerchUtil' not found in /homepages/3/d162072124/htdocs/fgf/perch/core/runtime/runtime.php on line 9
It sounds like you are missing files in this installation.
As far as I am aware all files uploaded successfully. Can you point me in the direction of which files in particular? Thanks Karen
That's a core Perch file. I would suggest that you reupload all files to make sure.
Ok, I have replaced the core and can see perch/core/lib/PerchUtil.class.php
but am still getting the error.
This is the code from runtime.php
Don't know if it's a red herring but something I am not sure of is why the debug path contains reference to the umbrella folders containing various websites not just the one with an error on i.e.
The hosting points to folder
fgf
for this website whereas/homepages/3/d162072124/htdocs
references higher folders outside of the website hosting folder for that website.Any advise? Karen
Are you seeing the string
define('PERCH_DEBUG', true);
on your page?this is what is displayed on the page:- define('PERCH_DEBUG', true); Fatal error: Class 'PerchUtil' not found in /homepages/3/d162072124/htdocs/fgf/perch/core/runtime/runtime.php on line 9
Ok. Did you put that in your config file? Is it outside PHP tags?
Hi I can only say this code:
define('PERCH_DEBUG', true);
is (the only code) in file config.php which has been uploaded to
perch/config
Is this what you mean?
I put PHP tags around <?php define('PERCH_DEBUG', true); ?>
the output from my page is
Fatal error: Class 'PerchUtil' not found in /homepages/3/d162072124/htdocs/fgf/perch/core/runtime/runtime.php on line 9
If your config file is otherwise empty, it sounds like you've not installed Perch yet.
I am not sure what has happened as a previously working perch page is now 'broken'. I will reinstall all perch files as previously suggested and see what happens. Thanks Karen
Or just restore your
config.php
from your backup.Yes, I had overwritten my config.php file and now all back as it was, so now I am getting debug:-
So let's get back to what is wrong with the code please.
Thanks Karen
"No matching content regions found. Check region name (monthoffers) and page path options."
Hi,
I didn't realise the page path would need a '/' before it, it now seems to be working OK.
Thanks for your help Karen