navigator passing parameter

Author Message

Mazen Alsibai

Sunday 09 October 2005 5:27:55 am

Hi:
i want to send a parameter after offset clause in the navigatior like this:
...../(offset)/8?kind=full
how to do so?
thanks

Sebastiaan van der Vliet

Sunday 09 October 2005 5:44:07 am

Hi Mazen,

You can do it as follows:
.../offset/8/(kind)/full

In the template the parameter is available as:
$view_parameters.kind

Don't forget to check the parameter input in the template, in case someone tries to pass a non-permitted value.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Mazen Alsibai

Monday 10 October 2005 12:33:07 am

Hi:
the problem is that ez append offset clause after any uri i put it ,is there anyway to avoid that?

Łukasz Serwatka

Monday 10 October 2005 12:35:56 am

Pass $view_parameters variable to navigator instead of $view_parameters.offset. That should do the trick.

{include name=navigator
                     uri='design:navigator/google.tpl'
                     page_uri=$node.url_alias
                     item_count=$list_count
                     view_parameters=$view_parameters
                     item_limit=$page_limit}

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

Mazen Alsibai

Monday 10 October 2005 2:27:39 am

Hi:
my url is ..../products?kind=0
that uri shows some products,
when i use navigator,the offset clause is appended to the end of this uri,and that doesont work,to work correctly it must be inserted between products and ?kind=0.
dous using view_parameters canceled the use of ?kind=0?
thanks

Łukasz Serwatka

Monday 10 October 2005 2:31:40 am

Use mine and Sebastiaan suggestion together.

/products/(kind)/0/

In TPL use {$view_parameters.kind}, this will display value of variable "kind".

When you will pass $view_parameters to navigator module. You will have something like /products/(kind)/0/(offset)/8.

If you still want to use ?kind= then you can try to use concat() function. Something
like

view_parameters=concat( $view_parameters.offset, "?kind=", ezhttp( 'kind', 'get' ) )

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

Mazen Alsibai

Tuesday 11 October 2005 1:42:10 am

Hi:
many thanks for you all,
the first way works correctly,
the second doesnot work
i got something like that:
...products/(kind)/0/(offset)/4/(1)/k/(2)/i/(3)/n/(4)/d/(5)/=
thanks

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 18 2025 19:23:23
Script start
Timing: Jan 18 2025 19:23:23
Module start 'layout'
Timing: Jan 18 2025 19:23:23
Module start 'content'
Timing: Jan 18 2025 19:23:24
Module end 'content'
Timing: Jan 18 2025 19:23:24
Script end

Main resources:

Total runtime0.7911 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.0469152.6250
Module start 'layout' 0.00590.0053 741.671939.4453
Module start 'content' 0.01110.7779 781.1172631.5859
Module end 'content' 0.78900.0020 1,412.703116.1641
Script end 0.7910  1,428.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4831160.0002
Check MTime0.00150.1895160.0001
Mysql Total
Database connection0.00120.147810.0012
Mysqli_queries0.721091.1507710.0102
Looping result0.00080.0993690.0000
Template Total0.751395.020.3757
Template load0.00220.279420.0011
Template processing0.749194.695320.3745
Template load and register function0.00020.022210.0002
states
state_id_array0.00150.186610.0015
state_identifier_array0.00230.286020.0011
Override
Cache load0.00190.2401470.0000
Sytem overhead
Fetch class attribute can translate value0.00090.111930.0003
Fetch class attribute name0.00240.304190.0003
XML
Image XML parsing0.00130.170130.0004
class_abstraction
Instantiating content class attribute0.00000.0027100.0000
General
dbfile0.00100.1300250.0000
String conversion0.00000.001440.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/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: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs