Magento 管理グリッドでアクション ラベルの代わりにアイコンを表示する方法。例: グリッド内の行を「編集」/「削除」する代わりに、画像アイコンを表示する必要があります
ありがとう、ムラリ
css.Simply Add to action array your new class like を使用してこの問題を解決しました
$this->addColumn('action',
array(
'header' => Mage::helper('mymodule')->__('Action'),
'width' => '100',
'type' => 'action',
'align' =>'center',
'getter' => 'getAnswerId',
'actions' => array(
array(
'caption' => Mage::helper('mymodule')->__('Delete'),
'url' => array('base'=> '*/*/delete'),
'confirm' => Mage::helper('mymodule')->__('Are you sure?'),
'class' => 'addm',
)
),
'filter' => false,
'sortable' => false,
'index' => 'store',
'is_system' => true,
));
そして、次のコードで新しい CSS を記述します。
.addm{
background-image:url('delete.png');
background-repeat:no-repeat;
text-indent:-9999px !important;
font-size:0px;
display:block;
margin-left:5px;
}.
あなたはやった。