Is there a way to add relative home page path in content blocks?

Permalink
Is there a way to add relative home page path in content blocks?

I would like to add this - <?php echo $this->url('');?> as part of a link in a content block but it's displaying it as "http://localhost/<?php echo $this->url('');?>mypage.html"

BlueFractals
 
jero replied on at Permalink Best Answer Reply
jero
The only way you're likely to get that working is by coding a custom template, which would treat the php tags as php, rather than text. Bear in mind that the wysiwig editor will have changed your <?php tags into <? etc.

Alternatively, install the php blockhttp://www.concrete5.org/marketplace/addons/simple-php-block/... instead.

I am curious why you can't just use the add-link-to-page option on the C5 part of the editor?
BlueFractals replied on at Permalink Reply
BlueFractals
Thanks jero.
I was using HTML block. But yes you are right, I can use "Add link to page" option in Content block. That's what I am going to do now. I've used that option so many times before but I kind of forgot about that option before I asked the question. I went blank for a second. :)