English 中文(简体)
在布局中, 管理程序相对于前端的皮肤路径
原标题:magento javascript skin path admin vs frontend in layout
  • 时间:2012-05-25 14:23:46
  •  标签:
  • magento

我有一个有联署材料的模块,我想在行政与前端两侧都使用。我目前在前端的皮皮夹上有我的联署材料。

skin/frontend/default/default/module/js/myfile.js

如果我需要同时在前端和行政部门使用这个联署材料, 这是最好的地方吗? 还是我应该把这个放到联署材料的根文件夹里?

当我试图在布局文件中添加一个 skin_js 项时,管理员没有在正确的路径上拉动 。

这是我在管理员和前端文件上都输入的条目。 有更好的方法吗? 还是我缺少的东西?

<action method="addItem"><type>skin_js</type><name>module/js/myfile.js</name></action>

<% 1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

http://www.site.com/skin/adminhtml/default/default/module/js/myfiles.js

<% 1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

http://www.site.com/skin/frontend/default/default/module/js/myfiles.js

问题回答

i 通常将 Js 文件保存在 js/lib 中, 这样我可以从任何地点访问它 。





相关问题
Magento addFieldToFilter allow NULLs

When using the Magento collection method addFieldToFilter is it possible to allow filtering by NULL values? I want to select all the products in a collection that have a custom attribute even if no ...

Get product link from Magento API

I am new to Magento and using their API. I need to be able to get the product url from the API call. I see that I can access the url_key and url_path, but unfortunately that s not necessarily what ...

magento extension installation

I want to install a Magento extension in WAMP, but not from the Magento connect system. How can I do this? I have the module (extension) code and I already installed the sample data in the Magento ...

Link to a specific step in onepage checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...

How do I filter a collection by a YesNo type attribute?

I have a ‘featured’ attribute, which has a Yes/No select-list as the admin input. I presume that the values for Yes and No are 1 and 0, as they are for every other Yes/No list. However, if I try and ...

热门标签