您在這裡

如何展開附加檔案

shenwei's 的頭像
shenwei 在 2010-03-06 (週六) 04:56 發表


如上圖
我有一個"資料上傳"的content type
想直接進到這個頁面後
附加檔案這邊是展開的
也就是不用再多一步去把欄位按出來
不知道要怎麼弄呢?
(目前不考慮使用cck加一個file欄位進去
因為用cck做出的欄位上傳的話會有中文檔名錯誤的問題
所以用原有的附加檔案這個預設欄位是最好的)

我先前有試過安裝 Formfilter 這個模組
但他只能隱藏不需要的欄位
並不能修改展開/疊合

附加檔案大小
Image icon open.gif4.33 KB

There are a lot of different methods to modify modules, such as hook the module, theme override function, css alteration, even put your own codes into module itself. As long as "the problem" has solved, it really doesn't matter. (every method is correct)

However, you also need to consider about "future maintenance."

Okay, It is one module, one line that you need to note down for now. But how about several modules, ten lines of codes in different places? and you need to check them every time when modules require upgrade (which happened a lot).

I would suggest other methods instead of putting codes into module itself, because it probably saves more time for debugging in the future.