I nearly posted a question this week about Helper_Url, I wanted to know how
people were using it in their templates. For example do you:


<div>
     "<?= $this- url(array('controller' => 'home', 'action' => 'news',
'module' => 'default', 'id' => 3, 'product'=>12, 'category'=>1), 'default',
true) ?>">my link 
</div>


 - or -


<?php

  $link = $this->url(array(
             'controller' => 'home',
             'action' => 'news',
             'module' => 'default',
             'id' => 3,
             'product'=>12,
             'category'=>1
             ),
             'default', true);

?>

<div>
     "<?= $link ? ">my link 
</div>


Or someother way?

So anything we can do to reduce the cruft in making URLs would be nice :)

My 2p would look like:



$this->url('/controller/action', array('id'=>12));

$this->cleanUrl('/controller/action', array('id'=>12));



but 90% of the time I am making links that go from one action to another, I
almost never jump between modules. So making me put the module name in each
url() is anoying, but I'm always passing parameters (product_id, order_id
etc)...



$this->url('action', array('id'=>12));
$this->url('controller/action', array('id'=>12));
$this->url('module/controller/action', array('id'=>12));

or

$this->url('action', array('id'=>12));
$this->url('controller', 'action', array('id'=>12));
$this->url('module', 'controller', 'action', array('id'=>12));



Thoughts?

monk.e.boy
-- 
View this message in context: 
http://n4.nabble.com/call-for-votes-issues-with-Zend-View-Helper-Url-tp1579375p1579707.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to