Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-11-11 22:36:36

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

Re: Error pages customisation

merz1,

Thanks for your reply.

My previous post #10 basically solves the problem. I was just hoping to find a solution that used simpler logic (ie less lines of code).

As for the confusion, I’m not sure how to explain the problem any better than in post #3. However, I’ll give it a go!

Forgetting meta descriptions for a moment, it all relates to my main navigation. Depending upon the web page being viewed, certain menu items show as links, whilst others show as plain text For example: if on the home page, the home page menu item is plain text, whilst the other menu items are links.

This works perfectly for all pages, except the error pages, which is why I posted the code in post #1.

Does that make any sense at all?


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#14 2009-11-11 22:40:46

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

Re: Error pages customisation

whaleen wrote:

I thought TXP by default sends you to an error page built with error_default if any status other than 200 occurs.

Absolutely. That’s not what this code is for. I’m sorry that I haven’t been able to make myself clearer :(

Hopefully, my previous post #13 clears things up just a tad ???


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#15 2009-11-11 22:45:32

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Error pages customisation

speeke wrote:

Hopefully, my previous post #13 clears things up just a tad ???

It did indeed. :) Glad you found a solution.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#16 2009-11-11 22:46:43

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

Re: Error pages customisation

On reflection, perhaps my topic title “Error pages customisation” should have read: “Dynamic menu links on error pages” or something of that nature. Sorry for all/any confusion!


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#17 2009-11-12 10:13:20

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Error pages customisation

it all relates to my main navigation. … menu item is plain text… other menu items are links.

This works perfectly for all pages, except the error pages, which is why I posted the code in post #1.

Does that make any sense at all?

Not to me :) Explanation for being so rude: the page template error_default reflects (aka ‘throws back’) the default section status. Your main navigation will show ‘section=default’ (aka homepage) behavior on an error page.

What is interesting in your question is that Textpattern (of course) is able to realize such a situation.

But I really don’t see any sense in reflecting section behavior in navigation under a severe error condition for a standard website.

Section dependent error pages can make sense if you really have totally different sections. Example could be a shopping mall and every section represents a shop and you want the shop navigation & design & specific shop error greeting to pop up for error conditions.

But you will still need error_default for everything which is not section dependent like tag & category pages!

OK, to come to an end; you solved your problem. Everything is fine :)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#18 2009-11-13 01:50:19

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

Re: Error pages customisation

@merz1,

At the risk of flogging a dead horse ;) … I am not trying to serve section dependent error pages at all. I merely have a main navigation which dynamically changes dependent upon which page is served.

The problem with the error pages is only due to the fact that they fall into the same category as the home page (ie <txp:if_section name="">) – which I understand is the “default”.

On the home page, the home page menu item appears as plain text, which is correct. In the case of the error pages, however, I need the home page menu item to be a link, and not plain text. Testing for <txp:if_status status="200"> overcomes this problem.

Now, is that as clear as mud??? :-)


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#19 2009-11-13 11:07:55

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Error pages customisation

Oh, yes, totally clear. As clear as my chrystal ball explaining the future.

Ok, got the ‘dead link’ situation. Well,…

  • a) Create an active ‘home’ link which is clickable where ever you are. There are some more situations where the ‘default’ behavior kicks in (search, category, ..?)! (Do not only trust your always present backup home link behind the website logo. The latter you have, don’t you? Well on your homepage you hide that useful link…)
  • b) And/or create a nice error workflow for mislead visitors as simple article: Oops, error. Go to home, use search or check the archive.

(Edit) Usability issue: Don’t use functional censorship to tell visitors what they can do. Esp. not in main navigation. Use ‘active’ class but keep the function. Everything else confuses users.

Only working usability alternative is to hide functions which is a reserved feature for complex navigation like in drop-downs or n-line menus.

Last edited by merz1 (2009-11-13 11:13:44)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB