Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-11-02 07:46:33
- joseph
- New Member
- Registered: 2005-08-02
- Posts: 4
Assigning Error Pages
I just upgraded to 4.0.2 (thanks, guys!!), and I’ve got one question so far:
I see the new page “error_default.” How does one actually assign a specific error page? For instance, if I were to delete error_default, how would Textpattern know where to look for an error page?
Thanks!
Offline
Re: Assigning Error Pages
It would use a hardcoded default error page.
You do not assign error pages. Textpattern looks (depending on the error-code) for a page template named error_xyz (xyz being the status code, 404, 401 etc.) , if it can’t one, it looks for error_default. If that doesn’t exist either, it uses the hardcoded default error-page.
Offline
#3 2005-11-02 08:14:14
- joseph
- New Member
- Registered: 2005-08-02
- Posts: 4
Re: Assigning Error Pages
Thanks for the speedy response! :) Just what I wanted to know.
Offline
Re: Assigning Error Pages
bangs head on desk
In an effort to create a theme that can install but does not overwrite existing forms (for the purpose of being easily be turned on and off, reverted from, or modified before going live with it) this is what seems to be my last stumbling block.
Are there any future design plans for allowing these forms to be specified somewhere (I guess it would need to be prefs somewhere vs. inside a given template)? Is this a “won’t ever change” thing or are you open to discussion on best way to handle things?
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
#5 2006-02-15 16:30:33
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Assigning Error Pages
I suspect what you want to know is how error pages are styled. There’s no specific theming for it as such, the page named “error_default” is what gets displayed.
Most people accomplish consistent site layout/display by separating a page into regions, like for example “header” and “footer”, and placing that info within a form. Then these blocks can be called from any page using the output_form tag. Check the manual (link above) for further info on the output_form tag.
Offline
Re: Assigning Error Pages
Everything i want to do with the output (logic, markup & presentation) I can and already do in the page template called “error_default”
but because I want to manage my theme seperately from the default installed templates I want to be able to do it with a template stored with the name “THEME_error_default” similar to the way I can also add my own pages called “THEME_default” and “THEME_archive” (as examples).
In the case of default tempalte I can use the “Sections” tab to witch between the default tempaltes and my custom ones, but there is no such facility to do this with the error doc templates.
Last edited by placenamehere (2006-02-15 17:57:12)
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
#7 2006-02-15 18:19:28
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Assigning Error Pages
I see.
Probably because no one’s asked for it yet or sent in a patch to do this. Error pages are relatively new feature to Textpattern.
Any reason you want to keep the default templates? If it’s a matter of “for reference” , you do realize you can always easily find them at the wiki (links are right there on the front page), right?
Offline
Re: Assigning Error Pages
Yes,
Since I’m trying to write a theme (vs. simply redesigning a single site i have full control over) I want something that isn’t destructive and that can be (relatively) easily turned on and off or otherwise easily backed out of if something goes wrong / the person installing it doesn’t like it. I’m also guarding against the case where the form “error_default” isn’t the code that is eay to revert to becuase you can grab it from the wiki.
Short of a true pluggable theme infrastruture I’m looking for ways to be as clean and as I can about packaging and related distribution issues.
Its the same impetus behind wanting to find non-plugin solutions to template issues that I’ve shown in a few other threads.
Last edited by placenamehere (2006-02-15 18:37:21)
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
#9 2006-02-15 18:45:28
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Assigning Error Pages
Ask for it (definable error page) in the feature requests forum.
You should know that proper theme support (switching between multiple ones, etc) is one of the oft promised future features, yet to be realized.
Offline
#10 2006-02-16 00:06:12
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline
Re: Assigning Error Pages
thanks zem.. a lot of that echos the things I am already trying to do unde the current system.
And yes mary, I’ve seen a few montions on the forums of plans to get theming in future versions. Just seeing this project or two as a good exercise in wht is possible now, what little gothchas there are in core tags and the current setup, what can be done now and what you’d really be asking a theme author to do / publish.
When i finish (and get some time to do so) I plan to write up what I find and what I think txp could do to make things easier.
But in the mean time, this error page thing really burns because its the only styl/page/form that I can’t either specify or eliminate :/
Site: placenamehere.com
Microformat Plugin: pnh_mf
Offline
Pages: 1