1
我正試圖將鏈接插入到窗體上顯示的錯誤消息。在我的行動中,我已經做到了。是什麼導致html標記在Zend_Element錯誤裝飾器中不呈現?
$this->view->editForm->getElement('value')->addError('this type/value combination already exists. click <a href="'
. $this->view->url(array(
'module' => 'collection',
'controller' => 'tag',
'action' => 'detail',
'id' => $tagExists->getId()
), null, true)
.'">here</a> to load the existing tag');
所以我想在我的網頁瀏覽器看的時候呈現的是
this type/value combination already exists click here to load the existing tag
和我所看到的是
this type/value combination already exists click <a href="/collection/tag/detail/id/9">here</a> to load the existing tag
我不知道如何真正原因該鏈接在瀏覽器中正確呈現。我假設在那個錯誤裝飾器中有某種輸出衛生髮生,但我不知道我應該在哪裏看。
確定,這將引發一個錯誤setEscape()不似乎對錯誤裝飾 – kristopher
調用未定義的方法Zend_Form_Decorator_Errors的方法: :setEscape() – kristopher
@kristopher對,我在看* *描述*裝飾。我已經更新了我的答案 – Phil