Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-02-02 18:33:45
- mauricenaef
- Member
- Registered: 2008-01-31
- Posts: 23
Stylesheet problem after changing to clean url's
Hi there
As described in the book “textpattern solutions” I startet out the development of my new page with default messy urls. Now as I change to clean url’s the css file somehow seems to only be linked correctly on the home page? I am calling it in in the header section which I have output in a form with regular xhtml. Is there anything I did wrong? In the inspections pane I dont get any problem and I am running the site on MAMP localy at the moment.
Thankya all in advance
maurice
Offline
Re: Stylesheet problem after changing to clean url's
You need url that works when the pages url works, as when it uses messy
<link rel="stylesheet" type="text/css" media="screen" title="Default" href="style.css" />
will work as it uses get values for the url. But when using clean urls, they are directories/paths for browser – so in different path it wont anymore work.
Therefor you need use the url (href) with slash or with full address. In example:
<link rel="stylesheet" type="text/css" media="screen" title="Default" href="/style.css" />
Or with automatically changing url – including domain:
<link rel="stylesheet" type="text/css" media="screen" title="Default" href="<txp:site_url />style.css" />
And there is also txp:css as alternative.
Cheers :)
Last edited by Gocom (2008-02-02 18:41:01)
Offline
#3 2008-02-02 19:01:26
- mauricenaef
- Member
- Registered: 2008-01-31
- Posts: 23
Re: Stylesheet problem after changing to clean url's
Wow!!
Thanks, solved the problem!
Really great and super fast support!!!
Cheers mate!
maurice
Offline
Offline