Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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
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
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