ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Use of EE Tags within a custom module's control panel

May 04, 2010 12:37pm

Subscribe [2]
  • #1 / May 04, 2010 12:37pm

    _janek

    1 posts

    Is it possible to use the EE Tagging system in a custom module’s control panel interface?

    I’m trying take advantage of those tags. Is there any way to achieve this?

    Thanks


    jan

  • #2 / May 04, 2010 12:45pm

    Lisa Wess

    20502 posts

    Hi, jan - welcome to the forums!

    The control panel is not intended to be used for template tag output, so no, this is not possible.

  • #3 / May 04, 2010 12:55pm

    _janek

    1 posts

    Okay then! Thanks for the fast reply.

  • #4 / May 04, 2010 4:22pm

    Manuel Payano

    144 posts

    ONLY FOR EE2

    Since the Control Panel does not initialize the template parser, you have to do that yourself.

    if (class_exists('EE_Template') == FALSE) require APPPATH.'libraries/Template'.EXT;
    $this->EE->TMPL = new EE_Template();

    You first need to define the template type and parse the string.. And you are golden

    $this->EE->TMPL->template_type = 'webpage';
    $this->EE->TMPL->parse($str);
    $final = $this->EE->TMPL->final_template;

    It should work..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases