Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-07-07 05:51:44
- slangofoil
- New Member
- Registered: 2009-07-07
- Posts: 4
[SOLVED] Individual article pages have no formatting
New to the forum!
I’ve been playing around with TXP for a few months but am just now getting to the point where I really want/need to implement it on my site. I’m still just testing locally on my own machine.
I’ve set up pages, sections, and forms, and have those all working. But I was going to start the process of formatting articles that I would post as blog entries (with comments and such). When I publish an article to my blog and click either on the title link or “comment” link, the page it takes me to is totally unformatted. Just a white page with the content, but no CSS styling.
How do I get my CSS formatting to apply to individual article pages?
Last edited by slangofoil (2009-07-07 16:16:21)
Offline
Re: [SOLVED] Individual article pages have no formatting
Hi
In write tab the article is assigned to a section, have you verified a section tab if that section is assigned to the right page en style?
Cheers
Offline
#3 2009-07-07 15:59:42
- slangofoil
- New Member
- Registered: 2009-07-07
- Posts: 4
Re: [SOLVED] Individual article pages have no formatting
Yes, it’s assigned to the correct section “blog” and shows up on mydomain.com/blog but loses formatting when I go to mydomain.com/blog/article-title.
And when I view the source code I can see my css file is linked and the html for the page output is there….it’s just…not showing up!
Thanks.
Offline
Re: [SOLVED] Individual article pages have no formatting
Are you sure that the link href
for the stylesheet is correct for that page so that the stylesheet is in fact loading? A good way to check would be to look at the page in the WebKit inspector (available in Safari, Google Chrome, and other WebKit browsers) or Firebug (Firefox).
Code is topiary
Offline
#5 2009-07-07 16:17:44
- slangofoil
- New Member
- Registered: 2009-07-07
- Posts: 4
Re: [SOLVED] Individual article pages have no formatting
Ok, this was total idiocy on my part. When I linked my css file I only did “/css/mystyle.css” so any lower level wouldn’t be able to access it without the full file path.
Offline
Re: [SOLVED] Individual article pages have no formatting
I often use href="<txp:site_url />css/mystyle.css"
. However, href="/css/mystyle.css"
should work (because of the opening slash) for any page unless the site root is in a subdirectory, so I’m surprised you had problems with it. More particularly, that you had problems with it but only on some pages.
Code is topiary
Offline
#7 2009-07-07 16:25:19
- slangofoil
- New Member
- Registered: 2009-07-07
- Posts: 4
Re: [SOLVED] Individual article pages have no formatting
Apparently I was missing the slash as well. BAH, typos. It worked on all the main pages but not on any sub-pages. A friend clued me in to that handy site url tag and I’m definitely using that from now on. :)
Last edited by slangofoil (2009-07-07 16:41:11)
Offline