Friday 31 July 2009 1:32:16 am
It is not very clear to me if the 'custom view' section of your tree displays in a different way the content that actually lies in the other sections or if it just displays content that is in it in a different way.
Regardless of what you want to achieve, you can hook into the content module and take complete control of the output, as long as you take some precautions. The advantage is that you get to keep the tree structure and the moving nodes around / renaming them / adding and deleting them capabilities for free. You can use an override template for both the pagelayout and the node templates of your custom section, based on a variety of factors: a new section, the content class, view mode etc... (see http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_override_conditions) Some useful tips might include: - take care about view cache for 'meta' nodes, ie. nodes whose templates do not show information coming from the node itself but info coming from elsewhere. You should try to use the smart view cache to introduce proper dependencies or disable the view cache for them and try to introduce some cache blocks to reduce the load - using a view mode as 'special mode' indicator forces you to use the system url of a node instead of the nice url, eg /content/view/mymode/64; You can set up wildcard url aliases to overcome that (and play around with the layout/set module, too)
- you might also code a full view for your nodes that, depending on a view parameter, includes via node_view_gui the template for another view mode, eg. user url like my/custom/node/(view)/customized and in the template do
{if is_set($view-parameters.view)}
{node_view_gui content_node=$node view=$view-parameters.view}
{else}
...
{/if}
- remember that by default only 'full' view mode benefits of view cache, but you can enable it for other view modes as well - an 'http_header' template operator to do redirects from within template come can be handy, eg. for templates that redirect to other nodes views
Principal Consultant International Business
Member of the Community Project Board
|