Javascript Magento呼叫帐户信息phtml块
我们正在我们的网站上与帐户信息布局的另一页。我们本想称之为block,但最终我们只得到了h3标题:帐户信息。 我们使用了这个:Javascript Magento呼叫帐户信息phtml块,javascript,magento,account,php,Javascript,Magento,Account,Php,我们正在我们的网站上与帐户信息布局的另一页。我们本想称之为block,但最终我们只得到了h3标题:帐户信息。 我们使用了这个: {{block type="core/template" template="customer/account/dashboard.phtml"}} 结果: 我们想要的是: 别管类别了 是不是我们做错了什么,很明显我们做错了什么 需要更多的信息吗?请随便问 首先,必须在布局xml中为此操作设置页面模板 例如: <reference name="root">
{{block type="core/template" template="customer/account/dashboard.phtml"}}
结果:
我们想要的是:
别管类别了
是不是我们做错了什么,很明显我们做错了什么
需要更多的信息吗?请随便问 首先,必须在布局xml中为此操作设置页面模板 例如:
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
然后你把你的代码放进。。。。。block.当您在页面内容中输出{{block…}声明时,您要做的是使用XML布局将菜单插入左侧边栏的左侧块a.k.a 在“设计>页面布局>布局”中,选择2列左侧边栏,然后将此块粘贴到XML部分,如果需要,请删除不必要的链接:
<reference name="left">
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
<action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
<action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
<action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
<action method="addLink" translate="label" module="downloadable"><name>downloadable_products</name><path>downloadable/customer/products</path><label>My Downloadable Products</label></action>
<action method="addLink" translate="label" module="newsletter"><name>newsletter</name><path>newsletter/manage/</path><label>Newsletter Subscriptions</label></action>
<action method="addLink" translate="label" module="oauth"> <name>OAuth Customer Tokens</name> <path>oauth/customer_token</path> <label>My Applications</label> </action>
<action method="addLink" translate="label" module="review"><name>reviews</name><path>review/customer</path><label>My Product Reviews</label></action>
<action method="addLink" translate="label" module="sales"><name>orders</name><path>sales/order/history/</path><label>My Orders</label></action>
<action method="addLink" translate="label" module="tag"><name>tags</name><path>tag/customer/</path><label>My Tags</label></action>
<action method="addLink" translate="label" module="wishlist" ifconfig="wishlist/general/active"><name>wishlist</name><path>wishlist/</path><label>My Wishlist</label></action>
</block>
</reference>
这个答案是部分参考了我对magento的额外积木的一些研究
此实现还有一些限制,因为您无法使此页面安全。据我所知,您需要为此创建一个自定义模块,@AlanStorm的这篇文章应该可以帮助您解决这个问题我有完全相同的问题,我需要将此代码放在layout.xml代码中还是放在后端?布局更新XMLI使用管理面板创建页面,不是为了我的福祉,而是为了我的同事;我再回答一个问题,谢谢!我会很感激的!请选择“设计”选项卡中带左栏的两列布局。他希望页面内容中包含数据,因为weme和他我们正在一起工作,希望页面顶部有tabpages,然后是account info、catalog和其他一些选项卡