This project is read-only.

Need help with custom theme

Topics: Themes
Oct 1, 2010 at 4:46 AM

I put a custom theme in the themes directory, and it shows up in the settings page.  I set my theme, name is 'Wood' and the formatting of the text on the page uses my css but none of my background images display on the page.  I have 2 CSS files, style.css for text and wood.css for images.  If i put Theme=Wood on the url, then the background images load.  IS there a way to get my images to load without specifying the theme on the url in a query string?

Oct 1, 2010 at 3:20 PM

Have you tried combining your CSS into one file?

Oct 1, 2010 at 3:30 PM

Yes, i did try that.  What is weird is that the theme loads properly if i put it on the url as a querystring parameter.  It definately loads my style.css (changing text, fonts, div locations and such) but omits my background wood.css (images and backgrounds).  Could this be a problem when it compresses the CSS if there are multiple?

Oct 1, 2010 at 7:04 PM

If your styles are in the theme folder and images in the "yourtheme/images" you would use something like:

background: url(images/background.jpg) repeat-x;

Oct 1, 2010 at 8:31 PM

This is exactly what i have.  If i view the page, no images, but text is formatted.  If i put theme=mytheme on the url then all is fine.

Is there a way to set a cookie or something in code to imitate what happens when i use the querystring for theme.

Oct 1, 2010 at 11:06 PM

This is odd. You might try to uncheck compression and stylesheet trimming in settings/advanced, see if it make any difference.

Oct 3, 2010 at 8:20 PM

That was it. Something was not working properly when the CSS ran through the CompressCSS() method.

Jason Nelson , MCSD, MCAD, SCJP

The following information is relevant if you have recently received an email from Jason Nelson. The information contained in the e-mail and any attachments are intended for the named recipient(s) only. It may also be privileged and confidential. If you are not an intended recipient, you must take no action as a result of receiving it, including, but not limited to copying, distributing and amending it. If the communication has been sent to you in error, please contact us immediately and do not show the communication to any other party. Jason Nelson shall have no liability whatsoever in respect of the content of the communication and makes no warranty as to accuracy. Any views or opinions presented are solely those of the author. Viruses: Although I have taken steps to ensure that the e-mail and attachments are free from viruses, I advise that in keeping with good computing practice, the recipient should ensure they are actually virus free.