Forum
Can't get banner images to show up as content regions in Perch
Here's my diagnostic...
SUMMARY INFORMATION
Perch: 2.8.31, PHP: 5.6.21, MySQL: 5.5.49, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', ); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /nfs/c12/h04/mnt/212604/domains/blog.memurise.com/html/perch PERCH_CORE: /nfs/c12/h04/mnt/212604/domains/blog.memurise.com/html/perch/core PERCH_RESFILEPATH: /nfs/c12/h04/mnt/212604/domains/blog.memurise.com/html/perch/resources Image manipulation: GD PHP limits: Max upload 99M, Max POST 99M, Memory: 99M, Total max file upload: 99M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes SCRIPT_NAME: /perch/core/settings/diagnostics/index.php REQUEST_URI: /perch/core/settings/diagnostics/ DOCUMENT_ROOT: /home/212604/domains/blog.memurise.com/html HTTP_HOST: blog.memurise.com
What I'm trying to do is simply set the banner image for each page of my site. However, I designed the banner images to be used as backgrounds in CSS. When I add the image tag to the CSS in the background url: section,
<perch:content id="image" type="image" label="Background image" />
Nothing comes up as new content to edit or add an asset. I think I'm missing a step.
What should I do?
(I'm currently playing with my "Life" page's code)
Have you added a content region to use with this template?
Ah, I don't think so -- do I do that with the <include> tag, then include the image.html? Or do I just <include> the
<perch:content id="image" type="image" label="Background image" />
code
Can I add that to the CSS?
I think this explains it best: https://docs.grabaperch.com/video/v/what-are-perch-regions/
It didn't really help me at all..
Ok, how did it not help? In what way are you stuck? What are you trying and how is it failing?
My banner background image is declared in the CSS. Can I still put an include code in CSS? I thought I could only do that in php files.
You can do one of three things.
Add your background as a
style
attributeAdd a CSS block to your page.
Set your server to parse CSS files as PHP https://docs.grabaperch.com/perch/getting-started/file-extensions/