Forums / Developer / Unable to use URL parameter

Unable to use URL parameter

Author Message

Albert Hornos

Tuesday 02 August 2005 4:53:14 am

Hi,
I'm trying to get an URL parameter from my url but it's impossible.
I've make the url at this way:

<form action={"content/action"|ezurl} method="post" name="Form-{$Products.product.id}">
		<input type="hidden" name="DestinationURL" value="shop/orderlist">
		<input type="hidden" name="(Producto)" value="{$Products.product.id}">
    <td class="number" align="right"><a href="javascript:;" onclick="document.forms['Form-{$Products.product.id}'].submit()">{$Products.sum_count}</a></td>
		</form>

The result is this:

http://xxx.xxx.com/gestion/shop/orderlist/(Producto)/84

Now I need to get the param "Producto" at orderlist.tpl.
I've tried {$view_parameters|attribute(show)} but the only parameter that it contains is "offset".

Could anybody help me?
Thanks!

Ɓukasz Serwatka

Tuesday 02 August 2005 6:00:22 am

Hi Albert,

You can`t access more parameters because only offset is available for view orderlist of module shop. This is not recommend but if you want to access more variables you will have to hack kernel\shop\module.php and add more params in

$ViewList["orderlist"] = array(
    "functions" => array( 'administrate' ),
    "script" => "orderlist.php",
    "default_navigation_part" => 'ezshopnavigationpart',
    "unordered_params" => array( "offset" => "Offset", "producto" => "Producto" ), //parameters
    "params" => array(  ) );

and also add in orderlist.php file

$producto = $Params['Producto'];

and change line

$viewParameters = array( 'offset' => $offset);

to

$viewParameters = array( 'offset' => $offset, 'producto' => $producto );

Now you should see two params, offset and producto and display it with {$view_parameters.producto}

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

Albert Hornos

Wednesday 03 August 2005 1:22:36 am

Thank you very much Lukasz,
Perhaps I didn't explain me so well and the solution is so drastic.
The only thing I needed was to pass parameters betewn 2 templates.

I've found another solution easier:
1- Pass the parameters like ?Param=Value
2- At the other template use {def $x=ezhttp('Param',get)}

Anyway Thank you again!

eZ debug

Timing: Jan 18 2025 19:34:43
Script start
Timing: Jan 18 2025 19:34:43
Module start 'content'
Timing: Jan 18 2025 19:34:43
Module end 'content'
Timing: Jan 18 2025 19:34:44
Script end

Main resources:

Total runtime0.7996 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.7188180.8359
Module start 'content' 0.00720.6476 768.5547552.9297
Module end 'content' 0.65490.1447 1,321.4844332.7500
Script end 0.7996  1,654.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5193210.0002
Check MTime0.00150.1873210.0001
Mysql Total
Database connection0.00130.160810.0013
Mysqli_queries0.716889.64591940.0037
Looping result0.00200.24631920.0000
Template Total0.773196.720.3866
Template load0.00260.326820.0013
Template processing0.770596.355720.3852
Template load and register function0.00030.036110.0003
states
state_id_array0.00070.090210.0007
state_identifier_array0.00070.084520.0003
Override
Cache load0.00210.2627330.0001
Sytem overhead
Fetch class attribute can translate value0.00140.170330.0005
Fetch class attribute name0.00130.162740.0003
XML
Image XML parsing0.00110.131330.0004
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00630.7859290.0002
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs