issues with "system-asset"
Hello,
I am using system-asset tag for background image inside my css
file something like this.
background-image:
url([system-asset]/Images/pageBG.jpg[/system-asset]);
It is getting save properly( when viewed in view tab) and I also
included the css file in the proper template.
But still the backgroung image is not getting displayed. Does anybody know why that may happen?
Thanks,
Ashish.
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Charlie Holder on 24 Feb, 2011 06:21 PM
When you click "Submit" to save the file, do you notice the file path being rewritten to something like the following:
url('/renderfile/4e089b6b0a00016a018849be0486059c/_common/images/bg01.jpg')
If not, double-check that you have the option to allow Cascade to rewrite links enabled for your stylesheet.
You can find that option here: Edit -> System and then "Rewrite links in file"
2 Posted by Ashish on 24 Feb, 2011 07:32 PM
Hello Charlie,
Thank you for your responce.
I do see similar format for the path when I hit submit as I had already checked the "Rewrite links in file", but it does not reflect on the "page".
I see other stylesheets I wrote in the same file(like font-size, color) reflect on the page, but not the "background-image".
3 Posted by Charlie Holder on 24 Feb, 2011 07:55 PM
Do you see the background image being rendered inside Cascade? Or is it only not rendering upon publishing?
4 Posted by Ashish on 24 Feb, 2011 07:59 PM
The background image is not rendering inside cascade itself. I have not yet published anything.
5 Posted by Brent Arrington on 24 Feb, 2011 09:09 PM
Not sure if this is your problem, but relative URLs in CSS files are relative to the CSS file itself, not the site root. So, if your site structure is like this:
Then image URLs in your style.css file would need to be
../images/pic1.jpg
, etc., -- not/images/pic1.jpg
6 Posted by Ashish on 24 Feb, 2011 09:51 PM
My issue has been resolved, I actually had a typo in the heading tag of my css. It was "#body" insted of "body".
Thank you Brent and Charlie for your help.
Charlie Holder closed this discussion on 15 Apr, 2011 07:43 PM.