URL Helper not found in CSS |
Morning & Afternoon all,
I've got a style sheet called custom.css.php that contains this: <?php header("Content-type: text/css; charset: UTF-8"); ?> body, html { width: 100%; height: 100%; } ... more styling stuff ... .archive-banner { background: url(<?= base_url("assets/media/images/hero-banner.jpg"); ?>) no-repeat center center; background-size: cover; } When I go to any page however, the formatting is all a bit odd. If I view the source of the style sheet then I can see this error: .archive-banner { background: url(<br /> <b>Fatal error</b>: Call to undefined function base_url() in <b>/var/www/public/projects/ida-ci/assets/styles/custom.css.php</b> on line <b>47</b><br /> I'm assuming that this error means that the URL helper isn't getting pulled into the custom.css.php file. But my autoload.php contains this: $autoload['helper'] = array('url'); Do I need to explicitly specify that the style sheet needs to include this helper too? Any ideas would be greatly appreciated. Cheers! |
Messages In This Thread |
URL Helper not found in CSS - by mohnjatthews - 03-07-2017, 05:52 AM
RE: URL Helper not found in CSS - by Wouter60 - 03-07-2017, 10:01 AM
RE: URL Helper not found in CSS - by mohnjatthews - 03-08-2017, 03:01 AM
RE: URL Helper not found in CSS - by Narf - 03-08-2017, 03:56 AM
RE: URL Helper not found in CSS - by mohnjatthews - 03-08-2017, 09:33 AM
RE: URL Helper not found in CSS - by InsiteFX - 03-08-2017, 11:24 AM
RE: URL Helper not found in CSS - by spjonez - 03-13-2017, 10:23 AM
|