Forums / Developer / Breadcrumbs, need different view mode

Breadcrumbs, need different view mode

Author Message

Peter Bailey

Tuesday 01 April 2003 9:20:14 am

I've got my breadcrumbs template snippet working, but for some nodes, I don't want the breadcrumb links to use the "full" view mode.

How can I specify A different view mode in a way that won't be a total pain in the butt? FYI, I've made some of my own view-modes.

Jan Borsodi

Thursday 03 April 2003 3:08:35 am

How are the links built now? Manually or trough other templates?

If it's manually then only have check for those special nodes and specify another view, like:

{section name=Child loop=$children}
{section show=eq($:item.node_id,42)}
{concat("content/view/special_mode/",$:item.node_id)|ezurl}
{section-else}
{concat("content/view/full/",$:item.node_id)|ezurl}
{/section}
{/section}

If it's trough other templates you can add the same check there or use override templates.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Peter Bailey

Thursday 03 April 2003 6:38:23 am

Ideally, I would like something like that, but I don't know how to go about doing that using the data from $Path, as each item only seems to have the url and text.

I wanted to create a new template in /design/(mydesign)/override/templates/node/view/ and name it breadcrumb_link.tpl.

Now, when making the breadcrumbs, I wanted to just usd it like this

{section name=Path loop=$module_result.path offset=2 max=-1}
/ {node_view_gui view=breadcrumb_link content_node=$Path:item}
{/section}

Following me? Is there another way to create these breadcrumbs without using $module_result.path? Or does $module_result.path contain more data than I think it does? I looked at the output from this

{$module_result.path|attribute(show())}

And there doesn't seem to be anything else I can use.

Erik Petersen

Tuesday 01 July 2003 3:28:03 pm

Sorry for being off topic but...

Can someone please explain to me where $module_result is documented? What class is it, what are its attributes and what other "global" objects are available to templates? What is $children? Where does it come from in the example above or is the example a snipit? My magic documanation decoder ring must be held up in the mail.

Another question on view modes: why do I not have a /design/standard/templates/node/view/embed.tpl file? I'm using 3.1 but it aint there as the documentation "suggests". I say that because it doesn't say much especially what I would use them for or what they might output.

I've spent 4 days so far farting with ezp3 and so far I'm yet to get a single page to display. The documentation takes me as far as an admin login page and whatever else I've found is either unclear, incomplete or an unanswered forum post.

Excuse my noobie rant but this trial and error approach has become trying. Is there any documentation that will take me from the admin login page to a visible and workable basic site? Anything at all that might help a site admin to get this thing working in any fashion at all or must I continue to search for easter eggs?