Perch shouldn't pick it up as a new region. It should automatically get the images and links and show them on the homepage with links in place.
A few things to check... what is the name of the Region for your projects on your projects.html page, or better still, can you show me the php code on that page?
Hey, thank you Dan. I learn a lot from the forum myself, so it's good to get involved.
Good luck with your build.
I have similar project sliders in some of my websites, but I don't always want to feature every project in the slider. So I sometimes add a tickbox in the project template for 'Show on homepage slider'. Adding this to the project tempate:
<perch:content id="feature_in_slider" type="checkbox" label="Feature on Home Page Slider" value="yes" suppress="true" />
And then filter on that ID on the homepage:
<?php
perch_content_custom('Projects list image', [
'page'=>'/projects.html',
'template'=>'project_carousel.html',
// filter the featured projects
'filter'=>'feature_in_slider',
'match'=>'eq',
'value'=>'yes',
]);
?>
Hi Daniel,
Perch shouldn't pick it up as a new region. It should automatically get the images and links and show them on the homepage with links in place.
A few things to check... what is the name of the Region for your projects on your projects.html page, or better still, can you show me the php code on that page?
from 'projects.html' :
Cool, so, this on your homepage should work:
and a template named:
project_carousel.html
in/perch/templates/content
containing:ok so that is indeed just showing the images on the homepage which is great
https://dev.griffbuild.co.nz/index.html
it is however loading another (invisible) image along side each that appear on the projects page
And, is each homepage image link is linking to the projects page, I was hoping it would link to the actual project page that each image relates to...
Thanks Simon
Ok, for linking to the actual project: sorry, missed an '=' in the template code:
Should be:
Just looking into the invisible image issue now...
Ok, I can see the links to the actual projects are working now.
Now to find the issue with those mysterious images. Can you show me the homepage code?
from index.html:
<body>
<?php perch_layout('global.header'); ?>
<?php perch_layout('global.footer'); ?>
one thing I notice is the invisible one always links to the last (3rd) project, If I ad a new project it then goes to the last (4th) project
Ok, spotted it. There is a missing '>' on the image tag.
Thanks you very much Simon
Fantastic Support
Give this man some points.
Regards, Dan
Hey, thank you Dan. I learn a lot from the forum myself, so it's good to get involved.
Good luck with your build.
I have similar project sliders in some of my websites, but I don't always want to feature every project in the slider. So I sometimes add a tickbox in the project template for 'Show on homepage slider'. Adding this to the project tempate:
And then filter on that ID on the homepage:
Even better, sound like a good feature, will add it in
Thanks again