Forum

Thread tagged as: Question

Clean URLs with _page

I'm using the following code on a page that essentially lists out other pages within the site which is doing the job for me but it's obviously giving me the URL complete with the .php suffix. Is there a way to remove this so that it maintains the clean URLs that I'm using throughout the rest of the site?

<a href="<perch:content id="_page" />"

I had planned on potentially using string replace to remove it but obviously I can't use PHP within my templates. Is there another way to achieve the clean URL?

Thanks

David Ellis

David Ellis 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You could use

replace=".php|"

Perfect!