I was wondering how I go about adding a “#” to a cakephp url without it being escaped. Ive tried ‘escape’ => false but to no success. I am doing this to try and link to a id=”comments” section of the page that has contains the comments. Here is my code for the linking:
<?php echo $this->Html->link($post['Post']['total_comments'].' comments', array('controller' => 'posts', 'action' => 'view', $post['Post']['slug'].'#comments'),array('class' => 'comments-icon')); ?>
Any help would be appreciated.
Try this: