Thursday 10 June 2004 12:52:04 am
I have a few problems maintaining a good title. Most of it stems from the fact that a node is not always available and getting a title is difficult. I filed this bug a while back describing the problem: http://ez.no/community/bug_reports/always_have_a_valid_node_object_available I have to perform some checks and put in code accordingly, eg:
{let my_node=0}
{section show=is_set($DesignKeys:used.node)}
{set my_node=fetch(content, node, hash(node_id, $DesignKeys:used.node))}
{/section}
<title>VisionWT
{switch match=$module_result.uri}
{case match='/user/register'}
- Register new user
{/case}
{case match='/user/login'}
- Login user
{/case}
{case match='/user/forgotpassword'}
- Forgot Password
{/case}
{case match='/shop/confirmorder'}
- Confirm Order
{/case}
{case}
{section show=is_set($search_text)}
- Search Results
{section-else}
{section show=ne($my_node, 0)}
- {$my_node.name}
{/section}
{/section}
{/case}
{/switch}
</title>
{/let}
It isn't ideal because you have to add more cases to cover every bit of ez publish that doesnt have a node. Though, in my haste i may have overlooked something. Are there better alternatives? paul
-- http://www.visionwt.com
|