1. CMS calls the website URL <a href = "{store direct_url =" about-us "}"> about us </a>
{Store direct_url = "}" refers to the base URL in the current magento background.
You can also call the {store url = ''} parameter.
2. CMS calls the image path
{Skin url = ''} calls the image path in the default topic package.
Reprinted fromMagento architect's notes| Call images and URLs in magento CMS
Call the image in the Code: <span> getskinurl ('images/f310g.jpg ');?> "> </Span>
3. In magento, we sometimes need to call images. We can call them in several ways, which can be divided into several situations:
1. In the phtml page, that is, in the template file,
Call in phtml
Yes <? PHP echo $ this-> getskinurl ('images/image')?>
Or in XML,
<Reference name = "right">
<Block type = "catalog/product_compare_sidebar" before = "cart_sidebar" name = "catalog. Compare. Sidebar" template = "catalog/product/compare/sidebar. phtml"/>
<Block type = "Core/template" name = "right. Permanent. callout" template = "callouts/right_col.phtml">
<Action method = "setimgsrc"> <SRC> images/image name </src> </Action>
<Action method = "setimgalt" translate = "Alt" module = "catalog"> <alt> keep your eyes open for our special back to school items and save a lot! </ALT> </Action>
</Block>
</Reference>
Here we have set the corresponding template file, the location where the template file appears, and the image path. You can use
<? PHP echo $ this-> getskinurl ($ this-> getimgsrc ()?> To obtain the image path. Of course, this setting is very troublesome. Generally, if you call an image directly, we can simply use the previous method, which is clear, but sometimes we need to place it on the left and right sides, in this way, we usually create a new template file first, and then catalog. declare the block in the XML file (slightly modify the content above), and then you can call it to change the image.
2. Call the image in the CMS block set in the background. We can use the following code to call