FaQ's ...">

Magento calls a cms page through the anchor tag from the phtml file

I want something like this
<a href="<?php echo getcmsurl('Faqs')">FaQ's</a>

means that when you click "FAQ" the cms page created with the name faqs from the admin panel will be linked (shown) and displayed.
Or is there another way?
Thanks.

+4
source share
3 answers

try it

  <a href="<?php echo $this->getUrl('Your cms page identifier'); ?>">My url</a> 
+9
source

If you are writing a phtml file you can use

 <a href="<?php echo $this->getUrl('cms page identifer'); ?>">yourlink</a> 

and if you are writing a static block or page, you can use

 <a href={{store url="cms page identifer"}}>your link</a> 
+12
source

try it

 <a href="<?php echo $this->getUrl('')?>Faqs">FaQ's</a> 
0
source

Source: https://habr.com/ru/post/906310/


All Articles