wg->SuppressPageHeader = true; $this->wg->out->setHTMLTitle( wfMessage( 'portable-infobox-builder-title' )->text() ); // extract base title from path $title = explode( self::PATH_SEPARATOR, $this->getPar(), self::EXPLODE_LIMIT )[0]; $noTemplateSet = empty( $title ) ? true : false; if ( $noTemplateSet ) { $this->response->setVal( 'noTemplateSet', true ); $this->response->setVal( 'setTemplateNameCallToAction', wfMessage( 'portable-infobox-builder-no-template-title-set' )->text() ); } else { $url = implode( self::PATH_SEPARATOR, [ $this->wg->server, self::INFOBOX_BUILDER_MERCURY_ROUTE, $title ] ); $this->response->setVal( 'iframeUrl', $url ); } $this->response->setTemplateEngine( WikiaResponse::TEMPLATE_ENGINE_MUSTACHE ); } /** * renders HTML for create new template page entry point */ public function renderCreateTemplateEntryPoint() { $this->response->setVal( 'createInfobox', wfMessage( 'portable-infobox-builder-create-template-entry-point-create-infobox' )->text() ); $this->response->setVal( 'createTemplate', wfMessage( 'portable-infobox-builder-create-template-entry-point-create-regular-template' )->text() ); $this->response->setVal( 'title', $this->request->getVal( 'title' ), '' ); $this->response->setTemplateEngine( WikiaResponse::TEMPLATE_ENGINE_MUSTACHE ); } }