Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-20 20:54:27

MacEdh
New Member
Registered: 2008-03-09
Posts: 6

Preview of article - title url shows page without css

When I use the link of a new article it shows only the content without the css.

http://www.meesterwillemontwerpt.nl/mwsite

When I make a new article it gets an url like: http://www.meesterwillemontwerpt.nl/mwsite/bron/12/brontest
When I open that in the browser there is no design anymore

http://www.meesterwillemontwerpt.nl/mwsite/bron shows fine

http://www.meesterwillemontwerpt.nl/mwsite/bron/ doesn’t

Where do I go wrong?

Thanks in advance!

Edwin

Offline

#2 2011-01-20 21:19:47

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Preview of article - title url shows page without css

The link to your stylesheet is relative:

<link href="mwlayout.css" rel="stylesheet" type="text/css" />

So when in /bron/, it will look for /bron/mwlayout.css. Change it to either href="/mwlayout.css" or, even better, href="<txp:site_url />mwlayout.css".

Offline

#3 2011-01-20 21:28:39

MacEdh
New Member
Registered: 2008-03-09
Posts: 6

Re: Preview of article - title url shows page without css

Wow, that’s quick!

Problem solved (wasted afternoon…)

Thanks a lot!

Dank je wel ;-)

Offline

#4 2011-01-20 21:51:29

MacEdh
New Member
Registered: 2008-03-09
Posts: 6

Re: Preview of article - title url shows page without css

By the way,

Is there a similar solution for images?

I use img src=“img/271f2_opt.gif” now but that image is also lost when linking via title url…

regards,

Edwin

Offline

#5 2011-01-20 22:46:08

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Preview of article - title url shows page without css

"<txp:site_url />img/271f2_opt.gif" ;)

<txp:site_url /> is the equivalent of the path to the root of your site, in your case http://www.meesterwillemontwerpt.nl/mwsite/ (with closing slash). If you ever move your site to another domain or directory, this tag will automatically reflect the new path, so that you don’t have to change all your links.

Last edited by els (2011-01-20 22:47:21)

Offline

#6 2011-01-21 07:02:00

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,256
Website GitHub Mastodon Twitter

Re: Preview of article - title url shows page without css

That is unless you use it in the css where you could use /img/271f2_opt.gif or if it doesn’t work go for the full path.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#7 2011-01-21 09:41:25

MacEdh
New Member
Registered: 2008-03-09
Posts: 6

Re: Preview of article - title url shows page without css

Thanks for the quick replies!

This problem is tackled ;-) Lots more are following ;-0

Do you happen to know if there are some examples of basic pages (in combination with forms) that describe basic website behavior?

regards, Edwin

Offline

#8 2011-01-21 13:06:38

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Preview of article - title url shows page without css

Would the links on this wiki page be helpful?

Offline

Board footer

Powered by FluxBB