Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Importing external CSS through TXP CSS
I’m experiencing a strange issue here.
When I turn messy URL mode off , whenever I access a link such as mysite/section/id everything BUT the CSS fomentation is displayed.
I’ve figured out that’s because I’m managing my CSS externally to TXP, thus, when it load something from such directory the css patch in the import rule doesn’t work.
Is there any way I can put an import rule like
@import url(css/index.css);
in TXP’s style manager?
Offline
Re: Importing external CSS through TXP CSS
Try this:
@import url(/css/index.css);
You need to use an absolute URL since the relative base changes depending on what section/category your viewing. I had to do that with my website to make a external (non TXP) css file work.
Having the external CSS files eliminates a hit on the DB, which for high-traffic sites, can save you a smidgeon of time.
Eric
Offline
Re: Importing external CSS through TXP CSS
Thanks edburdo, worked beautifully.
Offline
Pages: 1