GetSimple Support Forum

Full Version: Specific head image to a page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to have a specific image appear on your custom 404 page? Right now it's called via CSS in the template.
Make a page called 404 and do whatever you want in it.
(2013-05-29, 11:14:06)shawn_a Wrote: [ rel="nofollow" -> ]Make a page called 404 and do whatever you want in it.

I have one, and it calls
Code:
<template><![CDATA[template.php]]></template>
for all the code except main body content. I can easily make another template page and use it exclusively for 404, but was curious if there was a more efficient way.
If your images are not css background images but linked in the html you can put the img tags in a component then use
PHP Code:
<?php if (return_page_slug()=='404'get_component('COMPNAME'); ?>
in your template, or some other snippet of php from here:
http://get-simple.info/wiki/components-d...n-the_page

I suppose you could use a similar bit of php to link a particular page to a specific css but having a duplicate css is probably even less efficient than having a duplicate template.
The body of the pages have the slug so you can use CSS selectors for specific pages in most templates if not admit to yours and then targe that pages using a CSS rule.