Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-10-05 04:08:18
- Bexxie
- Member
- From: NJ, U.S.A.
- Registered: 2008-10-05
- Posts: 14
Issue with Permanent Link - possible style sheet issue?
Hi,
I’m new to Textpattern and am just getting my hands dirty. I’ve been using Textpattern solutions to learn and its been really great so far but now I’ve hit a wall and can’t seem to figure it out. So here is my situation:
I’m following the instructions on how to use the conditional tag <txp:if_individual_article> to display the permanent link of a blog entry onto the same page template. So my markup looks like this:
<txp:if_individual_article>
<txp:article form=“blog_entry” />
<txp:else />
<txp:article_custom form=“default” limit=“1” pgonly=“0” section=“blog” sort=“Posted desc” />
</txp:if_individual_article>
So the issue I’m running into is when I test it and click the permanent link it goes to a page that looks like my stylesheet is not attached to it. I’m using an external style sheet and have put it on the local folder on my computer and its been working fine except on the permanent links. There are no code errors popping up on the page, just plain old html with no styling. Does anyone have any idea what is going on here? I’ve been trying everything I can think of but I am new to this so maybe I’m missing something obvious.
Thanks in advance!
Offline
Re: Issue with Permanent Link - possible style sheet issue?
How are you calling the style sheet in the <head> section?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2008-10-05 16:20:23
- Bexxie
- Member
- From: NJ, U.S.A.
- Registered: 2008-10-05
- Posts: 14
Re: Issue with Permanent Link - possible style sheet issue?
<link href=“style.css” rel=“stylesheet” type=“text/css” media=“screen, all” />
Offline
Re: Issue with Permanent Link - possible style sheet issue?
hi bexxie.
the path is the problem. try this one:
<link href=“/style.css” rel=“stylesheet” type=“text/css” media=“screen, all” />
you change directory when following the direct link, but your link to the css is relative.
when putting the slash at the beginning of the href=”“ you tell the browser to start looking for the css in the root folder of your site.
Offline
#5 2008-10-05 19:29:11
- Bexxie
- Member
- From: NJ, U.S.A.
- Registered: 2008-10-05
- Posts: 14
Re: Issue with Permanent Link - possible style sheet issue?
Hi Jens31,
Thanks for your suggestion. I completely forgot about that. I tried it out, however, it couldn’t find my stylesheet at all when I did that. But it did make me notice that the plain html of my sections (where the stylesheet was working) still contains any graphics used, but the permalinks couldn’t find any of the graphics as well as the stylesheet.
Offline
Re: Issue with Permanent Link - possible style sheet issue?
Try this:-
<link href="<txp:site_url />style.css" rel="stylesheet" type="text/css" media="screen, all" />
If that works and you still aren’t seeing any images then you probably need to change the paths in your CSS.
Last edited by thebombsite (2008-10-06 13:07:14)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#7 2008-10-07 00:27:46
- Bexxie
- Member
- From: NJ, U.S.A.
- Registered: 2008-10-05
- Posts: 14
Re: Issue with Permanent Link - possible style sheet issue?
That worked! Thanks! However, the images that were in my stylesheet showed up but the ones coded in the forms did not. So I put that txp tag in the img tag for those images and that worked too! What does that txp tag do exactly?
Offline
Re: Issue with Permanent Link - possible style sheet issue?
It is replaced by the path to the site that you have entered in the “Preferences” tab, in other words what you end up with is the full url to the CSS or image file.
Any reason why you aren’t using the <txp:image /> tag for those images contained in the forms?
Last edited by thebombsite (2008-10-07 10:51:35)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#9 2008-10-07 13:38:54
- Bexxie
- Member
- From: NJ, U.S.A.
- Registered: 2008-10-05
- Posts: 14
Re: Issue with Permanent Link - possible style sheet issue?
Because I’m still learning and don’t know any better lol It makes sense to use <txp:image /> for my images now that you mention it. I’m sure I’ll get the hang of all this sooner or later lol Thanks for your help!
Offline