Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-02 18:18:30

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Style sheet in the new error_default page

Interesting, placed my normal markup in the new error_default page, so that the new error page would display using the same style as the rest of the site.

<code>
<link rel=“stylesheet” href=”<txp:css />” type=“text/css” />
</code>

Placing that in the error_default page does not work, as the page source shows:

<code>
<link rel=“stylesheet” href=“http://www.solborg.fhs.no/txp/textpattern/css.php?s=” type=“text/css” />
</code>

I think the section is not being set?

Offline

#2 2005-11-02 18:37:07

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Style sheet in the new error_default page

You need to place all the CSS for the error pages in the head section using

<code>
<style type=“text/css”>
<!—
—>
</style></code>
<br />

just like it is in the error_default as supplied.

Last edited by thebombsite (2005-11-02 18:37:29)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-11-02 19:06:35

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Style sheet in the new error_default page

The section is not set, because well, it’s not a section, it’s an error page. ;)

you can use an attribute to the <txp:css /> tag to call a specific css-style, use n="default" for example. But of course putting it inline as it already is, works just as well.

Offline

#4 2005-11-02 20:06:07

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Style sheet in the new error_default page

Well I’ve never been able to get a “link rel” working for the error templates Sencer, so I assumed it was “in-line” in the default for a reason, like for instance, “link rel” doesn’t work.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-11-02 20:25:14

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Style sheet in the new error_default page

I don’t understand what you are saying.

Using this <link rel="stylesheet" href="<txp:css n="default"/>" type="text/css" /> works fine for me.

Offline

#6 2005-11-02 20:34:50

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Style sheet in the new error_default page

Ah. Now I don’t think I was using n=“default” so I’ll have to try that out when I do my next port. My own error template uses an external stylesheet and I ain’t messin’ with it. :) Now I’ve asked this before without response so are there any other errors apart from 404 that we can use templates for?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2005-11-02 21:07:18

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Style sheet in the new error_default page

txp_die(gTxt(‘404_not_found’), ‘404’);
txp_die(gTxt(‘unknown_section’), ‘404’);

txp_die(gTxt(‘comments_closed’), ‘403’);
txp_die(gTxt(‘your_ip_is_blacklisted_by’.’ ‘.$blacklisted), ‘403’);
txp_die(gTxt(‘you_have_been_banned’), ‘403’);

txp_die(gTxt(‘auth_required’), ‘401’);

The default value for txp_die’s status code is 503 (Service Unavailable). And then there is of course the possibility of plugins that may handle things like 410 Gone, 300 Multiple Choices, 402 Payment Required, 412 Precondition Failed, 414 Request-URI Too Long etc. etc.

Offline

#8 2005-11-03 03:40:34

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Style sheet in the new error_default page

Thank you Sencer. Plug-ins are not my favourite toy right now so I’ll just stick to the TXP generated errors. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB