2012-01-17 4 views
0

메뉴에 대한 설명을 위해 Joomla 1.5 메뉴에서 사용자 정의 필드를 만들었습니다. component.xmladministrator\components\com_menus\models\metadata에 편집했지만 지금은 일반 텍스트 상자 대신 텍스트 편집기를 넣고 싶습니다. 어떤 아이디어가 이것에 접근하는 방법?joomla의 사용자 정의 필드 용 텍스트 편집기

답변

0

편집기 유형의 요소를 만들어야합니다.

Learn how to create elementhow to save data

class JElementMyeditor extends JElement 
{ 
    var $_name = 'Myeditor'; 

    /** 
    * @param $name 
    * @param $value 
    * @param $node 
    * @param $control_name 
    */ 
    function fetchElement($name, $value, &$node, $control_name) 
    { 
     $editor = JFactory::getEditor(); 

     $width = $node->attributes('width'); 
     $height = $node->attributes('height'); 
     $col = $node->attributes('col'); 
     $row = $node->attributes('row'); 

     // ($name, $html, $width, $height, $col, $row, $buttons = true, $params = array()) 
     return $editor->display($control_name.'['.$name.']', 
           htmlspecialchars($value, ENT_QUOTES), 
           $width, $height, $col, $row, 
           array('pagebreak', 'readmore')) ; 
    } 
} 

그리고 당신은 내가 제대로 내가 각각의 매개 변수 (시스템)에 여분의 필드를 추가 한 설명하지 않았다

<param name="custom_param" 
     width="300" 
     height="150" 
     type="myeditor" 
     label="LABEL" 
     description="DESC" 
     /> 
+0

죄송 XML로 이것을 사용할 수 있습니다 메뉴 항목 코드입니다 \t ' 텍스트 편집기가 필요합니다. 거기에서 내가 찾았지만 아무것도 얻지 않았던 방법 – swap

+0

나는 나의 대답을 바꿨다. – Gaurav

+0

사용해 주셔서 감사합니다. – swap

관련 문제