final function execute() {
		//parse content first, to allow for any ADDTEMPLATE items
		$content = $this->parseContent($this->data['bodycontent']);

		if( !$this->getLayoutClass()	){
			throw new \Exception('No layout class defined.');
		}
		$layoutClass = $this->getLayoutClass();
		$layout = new $layoutClass($this->getSkin(), $this);
		//set up standard content zones
		//head element (including opening body tag)
		$layout->addHTMLTo('head', $this->html('headelement') );
		//the logo image defined in LocalSettings
		$layout->addHTMLTo('logo', $this->data['logopath']);
		$layout->addHTMLTo('prepend:body', $this->html( 'prebodyhtml' ));
		//the article title
		if($this->showTitle){
			$layout->addHTMLTo('content-container.class', 'has-title');
			$layout->addHTMLTo('title-html', $this->data['title']);
		}
		//article content
		$layout->addHTMLTo('content-html', $content);
		//the site notice
		if( !empty($this->data['sitenotice'])){
			$layout->addHTMLTo('site-notice', $this->data['sitenotice']);
		}
		//the site tagline, if there is one
		if($this->showTagline){
			$layout->addHTMLTo('content-container.class', 'has-tagline');
			$layout->addHTMLTo('tagline', $this->getMsg('tagline') );
		}
		$breadcrumbTrees = $this->breadcrumbs();
		$layout->addTemplateTo('breadcrumbs', 'breadcrumbs', array('trees' => $breadcrumbTrees) );

		// if(\Skinny::hasContent('toc')){
		// 	$layout->addHTMLTo('toc', (\Skinny::getContent('toc')[0]['html']));
		// }

		// if ( $this->data['dataAfterContent'] ) {
		// 	$layout->addHTMLTo('append:content', $this->data['dataAfterContent']);
		// }
		//the contents of Mediawiki:Sidebar
		// $layout->addTemplate('classic-sidebar', 'classic-sidebar', array(
		// 	'sections'=>$this->data['sidebar']
		// ));
		// //list of language variants
		// $layout->addTemplate('language-variants', 'language-variants', array(
		// 	'variants'=>$this->data['language_urls']
		// ));

		//page footer
		$layout->addHookTo('footer-links', array($this,'getFooterLinks'));
		$layout->addHookTo('footer-icons', array($this,'getFooterIcons'));
		//mediawiki needs this to inject script tags after the footer
		$layout->addHookTo('append:body', array($this,'afterFooter'));


		$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();

		//allow skins to set up before render
		$this->initialize();

		echo $layout->render();
		// $this->printTrail();
	}
final function execute() {
		//parse content first, to allow for any ADDTEMPLATE items
		$content = $this->parseContent($this->data['bodycontent']);

		if( !$this->getLayoutClass()	){
			throw new \Exception('No layout class defined.');
		}
		$layoutClass = $this->getLayoutClass();
		$layout = new $layoutClass($this->getSkin(), $this);
		//set up standard content zones
		//head element (including opening body tag)
		$layout->addHTMLTo('head', $this->html('headelement') );
		//the logo image defined in LocalSettings
		$layout->addHTMLTo('logo', $this->data['logopath']);
		$layout->addHTMLTo('prepend:body', $this->html( 'prebodyhtml' ));
		//the article title
		if($this->showTitle){
			$layout->addHTMLTo('content-container.class', 'has-title');
			$layout->addHTMLTo('title-html', $this->data['title']);
		}
		//article content
		$layout->addHTMLTo('content-html', $content);
		//the site notice
		if( !empty($this->data['sitenotice'])){
			$layout->addHTMLTo('site-notice', $this->data['sitenotice']);
		}
		//the site tagline, if there is one
		if($this->showTagline){
			$layout->addHTMLTo('content-container.class', 'has-tagline');
			$layout->addHTMLTo('tagline', $this->getMsg('tagline') );
		}
		$breadcrumbTrees = $this->breadcrumbs();
		$layout->addTemplateTo('breadcrumbs', 'breadcrumbs', array('trees' => $breadcrumbTrees) );

		// if(\Skinny::hasContent('toc')){
		// 	$layout->addHTMLTo('toc', (\Skinny::getContent('toc')[0]['html']));
		// }

		// if ( $this->data['dataAfterContent'] ) {
		// 	$layout->addHTMLTo('append:content', $this->data['dataAfterContent']);
		// }
		//the contents of Mediawiki:Sidebar
		// $layout->addTemplate('classic-sidebar', 'classic-sidebar', array(
		// 	'sections'=>$this->data['sidebar']
		// ));
		// //list of language variants
		// $layout->addTemplate('language-variants', 'language-variants', array(
		// 	'variants'=>$this->data['language_urls']
		// ));

		//page footer
		$layout->addHookTo('footer-links', array($this,'getFooterLinks'));
		$layout->addHookTo('footer-icons', array($this,'getFooterIcons'));
		//mediawiki needs this to inject script tags after the footer
		$layout->addHookTo('append:body', array($this,'afterFooter'));


		$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();

		//allow skins to set up before render
		$this->initialize();

		echo $layout->render();
		// $this->printTrail();
	}
final function execute ( ) { //parse content first, to allow for any ADDTEMPLATE items $ content = $ this -> parseContent ( $ this -> data [ 'bodycontent' ] ) ; if ( ! $ this -> getLayoutClass ( ) ) { throw new \ Exception ( 'No layout class defined.' ) ; } $ layoutClass = $ this -> getLayoutClass ( ) ; $ layout = new $ layoutClass ( $ this -> getSkin ( ) , $ this ) ; //set up standard content zones //head element (including opening body tag) $ layout -> addHTMLTo ( 'head' , $ this -> html ( 'headelement' ) ) ; //the logo image defined in LocalSettings $ layout -> addHTMLTo ( 'logo' , $ this -> data [ 'logopath' ] ) ; $ layout -> addHTMLTo ( 'prepend:body' , $ this -> html ( 'prebodyhtml' ) ) ; //the article title if ( $ this -> showTitle ) { $ layout -> addHTMLTo ( 'content-container.class' , 'has-title' ) ; $ layout -> addHTMLTo ( 'title-html' , $ this -> data [ 'title' ] ) ; } //article content $ layout -> addHTMLTo ( 'content-html' , $ content ) ; //the site notice if ( ! empty ( $ this -> data [ 'sitenotice' ] ) ) { $ layout -> addHTMLTo ( 'site-notice' , $ this -> data [ 'sitenotice' ] ) ; } //the site tagline, if there is one if ( $ this -> showTagline ) { $ layout -> addHTMLTo ( 'content-container.class' , 'has-tagline' ) ; $ layout -> addHTMLTo ( 'tagline' , $ this -> getMsg ( 'tagline' ) ) ; } $ breadcrumbTrees = $ this -> breadcrumbs ( ) ; $ layout -> addTemplateTo ( 'breadcrumbs' , 'breadcrumbs' , array ( 'trees' => $ breadcrumbTrees ) ) ; // if(\Skinny::hasContent('toc')){ // 	$layout->addHTMLTo('toc', (\Skinny::getContent('toc')[0]['html'])); // } // if ( $this->data['dataAfterContent'] ) { // 	$layout->addHTMLTo('append:content', $this->data['dataAfterContent']); // } //the contents of Mediawiki:Sidebar // $layout->addTemplate('classic-sidebar', 'classic-sidebar', array( // 	'sections'=>$this->data['sidebar'] // )); // //list of language variants // $layout->addTemplate('language-variants', 'language-variants', array( // 	'variants'=>$this->data['language_urls'] // )); //page footer $ layout -> addHookTo ( 'footer-links' , array ( $ this , 'getFooterLinks' ) ) ; $ layout -> addHookTo ( 'footer-icons' , array ( $ this , 'getFooterIcons' ) ) ; //mediawiki needs this to inject script tags after the footer $ layout -> addHookTo ( 'append:body' , array ( $ this , 'afterFooter' ) ) ; $ this -> data [ 'pageLanguage' ] = $ this -> getSkin ( ) -> getTitle ( ) -> getPageViewLanguage ( ) -> getCode ( ) ; //allow skins to set up before render $ this -> initialize ( ) ; echo $ layout -> render ( ) ; // $this->printTrail(); }
This is called by MediaWiki to render the skin.
This is called by MediaWiki to render the skin .