当我们使用REST服务器处理项目时,我的团队和我使用Postman.
我通常是构建REST服务器并在Postman中映射所有请求的人,我将其导出集合并在git中提交,以便团队的其余成员保持最新并且可以在开发时进行自己的测试客户端使用REST服务器.
我一直在看PAW一段时间,我有两个问题:
谢谢
我需要before通过布局更新引用调用将属性附加到块.
这是我的local.xml档案:
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="content">
<block type="page/html_wrapper" name="content.footer" as="contentFooter" translate="label" after="-">
<label>Content Footer</label>
<action method="setElementId"><value>content-footer</value></action>
<action method="setElementClass"><value>clear</value></action>
</block>
</reference>
</default>
<catalog_category_default>
<reference name="breadcrumbs.container">
<action method="unsetChild"><name>category.title</name></action>
</reference>
<reference name="content">
<block type="catalog/category_view" name="category.title" template="catalog/category/title.phtml" before="content.footer"/>
</reference>
</catalog_category_default>
</layout>
Run Code Online (Sandbox Code Playgroud)
我的问题是,在content块上我创建了一个content.footer块,您可以在管理员中分配小部件.我after="-"在content.footer块上使用所以在我看来,应该总是把它放在内容块的底部,但事实并非如此.
当查看目录类别,并将其插入该category.products块中的content块时,它显示下方content.footer的块.使其工作的唯一方法是,如果我在我的内容中重新定义local.xml并包含所有子块category.products,并在之前设置before="content.footer".
所以我想为什么我不能category.products在catalog_category_default布局中使用引用并设置块的before属性,我尝试了以下内容:
<reference name="category.products">
<action method="setBefore"><value>content.footer</value></action>
</reference>
Run Code Online (Sandbox Code Playgroud)
哪个没有影响.
我也注意到这个 …