Custom node view and nice url

Author Message

laurent le cadet

Monday 01 October 2007 1:41:32 am

Hi,

I'm using sevral view for a content class.
It seems basic but and I can't find how to render nice URL:)

<a href={concat('/fr/content/view/company_product/', $node.node_id)}>Products</a>

Any hint?

Regards.

Laurent

Łukasz Serwatka

Monday 01 October 2007 2:45:00 am

{$node.url_alias} hold "nice url" for current node.

If you know node ID you can use URL manager (Setup tab) and assign new URL to it.

/content/view/full/NodeID -> /my_custom_nice_url

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

laurent le cadet

Monday 01 October 2007 3:08:02 am

Łukasz,

The problem is I can use the URL manager as there is actually about 1500 objects and there will be more created by users in frontoffice.

The parent_node is Company and children are Products,News...

I want to render the company_products list or company_news list in a different maner regarding the user is the owner or not.

For that I have links in full/company.tpl pointing to the custom views to toggle between the different views:

Products list | News list

That's why I'm dealing with custom node view.
For non-owners, children will be render in regular view line (i.e).

Is that clear enough.

Laurent

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:30:24
Script start
Timing: Jan 31 2025 03:30:24
Module start 'layout'
Timing: Jan 31 2025 03:30:24
Module start 'content'
Timing: Jan 31 2025 03:30:25
Module end 'content'
Timing: Jan 31 2025 03:30:25
Script end

Main resources:

Total runtime1.2378 sec
Peak memory usage8,192.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.1328151.2109
Module start 'layout' 0.00640.0040 739.3438220.6875
Module start 'content' 0.01041.2265 960.03134,452.4609
Module end 'content' 1.23690.0008 5,412.492212.1641
Script end 1.2377  5,424.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2700160.0002
Check MTime0.00130.1034160.0001
Mysql Total
Database connection0.00080.062110.0008
Mysqli_queries1.145392.5318570.0201
Looping result0.00060.0504550.0000
Template Total1.172394.720.5862
Template load0.00200.159520.0010
Template processing1.170394.552120.5852
Template load and register function0.00160.128610.0016
states
state_id_array0.00290.234110.0029
state_identifier_array0.00220.180220.0011
Override
Cache load0.00160.1330280.0001
Sytem overhead
Fetch class attribute can translate value0.00180.143820.0009
Fetch class attribute name0.00240.191750.0005
XML
Image XML parsing0.00290.235320.0015
class_abstraction
Instantiating content class attribute0.00000.001760.0000
General
dbfile0.00340.2773240.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs