简体   繁体   English

Magento通过phtml文件中的锚标记调用cms页面

[英]Magento call cms page through anchor tag from phtml file

I want something like this 我想要这样的东西
<a href="<?php echo getcmsurl('Faqs')">FaQ's</a>

means on clicking FAQ's ,cms page created named faqs from admin panel would be linked (called) and displayed. 表示单击常见问题解答时,将从管理面板创建名为faqs cms页面进行链接(调用)并显示。
Or is there any other way ? 或者还有其他方法吗?
Thanks. 谢谢。

If you are writing in phtml file then you can use 如果您正在编写phtml文件,那么您可以使用

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

and if you are writing in static block or page then you can use 如果你在静态块或页面写,那么你可以使用

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

尝试这个

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

试试这样吧

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM