File modules/cms/action/page/PagePreviewAction.class.php
Last commit: Sat Mar 19 00:24:33 2022 +0100 dankert Fix: Using the correct PageContext for generating the page source.
1 <?php 2 namespace cms\action\page; 3 use cms\action\Method; 4 use cms\action\PageAction; 5 use cms\action\RequestParams; 6 use cms\generator\link\PreviewLink; 7 use cms\generator\PageContext; 8 use cms\generator\Producer; 9 use util\Html; 10 11 class PagePreviewAction extends PageAction { 12 13 14 /** 15 * Calculates the URL for the page preview 16 */ 17 public function view() { 18 19 $this->setModelAndLanguage(); 20 21 $linkFormat = new PreviewLink( $this->createPageContext(Producer::SCHEME_PREVIEW) ); 22 $this->setTemplateVar('preview_url',$linkFormat->linkToObject($this->page,$this->page) ); 23 } 24 25 }
Downloadmodules/cms/action/page/PagePreviewAction.class.php
History Sat, 19 Mar 2022 00:24:33 +0100 dankert Fix: Using the correct PageContext for generating the page source. Fri, 18 Mar 2022 22:38:42 +0100 dankert Refactoring: Extracted the TemplateGenerator out of the PageGenerator. Sun, 13 Feb 2022 19:39:49 +0100 dankert Refactoring: Special output type "preview" for previewing pages and files. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.