Reputation: 69
I have a cakePHP script running on my server - unfortunately though I encounter severe ISP cache therefore I've seen to append an URL to some URLs as below:
<h2><?php echo $this->Html->link('Clients', array('controller' => 'clients', 'action' => 'index?nc='.time().'')); ?></h2></div></div>
By adding ?nc='.time().' the URL automatically appends a timestamp which helps me avoid the ISP cache issue. e.g. /clients/index?nc=1364619426
While I figured out how to make this work on some URLs I do not seem to obtain this result on others. I have this data-table which lists all my clients with an ending View / Edit link button. Please see below:
<?php echo $this->Html->link('View/Edit', array('action' => 'view', $client['Client']['id']), array('class' => 'view')); ?>
Once this button is clicked and the page opens the URL structure is: /clients/view/1
What's the best way to implement the previously mentioned ?nc='.time().' into this url? My ideal goal is to have this URL looking like /clients/view/1?nc=1364619426
Some expert advise would be really helpful since I am very new to CakePHP.
Upvotes: 0
Views: 218
Reputation: 8223
<?php echo $this->Html->link('View/Edit', array('action' => 'view', $client['Client']['id']), "?" => array('nc' => time(), array('class' => 'view')); ?>
Upvotes: 1