Version: 4.3.1 Reporter: bree —
When using the pages module, if the pages tab and/or the pages template field is hidden in an edit layout, the preview panel always shows the homepage.
Is it possible to hide the page’s template drop down from the editor and still have a working preview?
In system/ee/EllisLab/ExpressionEngine/Model/Channel/ChannelEntry.php
add the following at line 1201:
public function getPageTemplateID()
{
if ( ! $this->hasPageURI())
{
return NULL;
}
return $this->Site->site_pages[$this->site_id]['templates'][$this->getId()];
}
In system/ee/EllisLab/ExpressionEngine/Controller/Publish/Publish.php
at line 408 add:
if ( ! $template_id)
{
$template_id = $entry->getPageTemplateID();
}
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```