Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Hide content title #206

Closed
wants to merge 3 commits into from

3 participants

@jelmersnoeck

It is now possible to hide the content title from the backend. Previously this was only possibly in the action code itself.

jelmersnoeck and others added some commits
@tijsverkoyen
Owner

Jelmer is dit niet iets dat vanuit de module moet geregeld worden? Of waarom heb je dit nodig gehad?

@jelmersnoeck

Hierbij denk ik vooral aan Frontenders die deze optie zullen gebruiken. Nu zetten wij dit altijd af/aan, maar als een FE iets anders wil moeten ze weer bij ons komen aankloppen.

@tijsverkoyen
Owner

Wrm maak je dan geen aparte template?
Ale, ik vind dat gewoon clutter

@dieterve

Dit is iets dat in dice fase moet bepaald worden. Zoals @tijsverkoyen zegt, we moeten de interface hier niet meer clutteren.

@dieterve dieterve closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 11, 2012
  1. Added an option to enable or disable the page title on the page itsel…

    jelmersnoeck authored
    …f in the backend
  2. Fixed a whitespace

    jelmersnoeck authored
  3. Added the changelog

    jelmersnoeck authored
This page is out of date. Refresh to see the latest.
View
10 CHANGELOG.md
@@ -1,3 +1,13 @@
+3.2.1 (xxxx-xx-xx)
+--
+Improvements:
+
+* Pages: It is now possible to hide the content title from the backend. Previously this was done in the action code.
+
+Bugfixes:
+
+
+
3.2.0 (2012-01-10)
--
Improvements:
View
2  backend/modules/pages/actions/add.php
@@ -116,6 +116,7 @@ private function loadForm()
$this->frm->addEditor('html');
$this->frm->addHidden('template_id', $defaultTemplateId);
$this->frm->addRadiobutton('hidden', array(array('label' => BL::lbl('Hidden'), 'value' => 'Y'), array('label' => BL::lbl('Published'), 'value' => 'N')), 'N');
+ $this->frm->addCheckbox('hide_content_title');
// a god user should be able to adjust the detailed settings for a page easily
if($this->isGod)
@@ -317,6 +318,7 @@ private function validateForm()
if($this->frm->getField('is_action')->isChecked()) $data['is_action'] = true;
if($redirectValue == 'internal') $data['internal_redirect'] = array('page_id' => $this->frm->getField('internal_redirect')->getValue(), 'code' => '301');
if($redirectValue == 'external') $data['external_redirect'] = array('url' => $this->frm->getField('external_redirect')->getValue(), 'code' => '301');
+ $data['hide_content_title'] = ($this->frm->getField('hide_content_title')->getChecked());
// build page record
$page['id'] = BackendPagesModel::getMaximumPageId() + 1;
View
4 backend/modules/pages/actions/edit.php
@@ -198,6 +198,7 @@ private function loadForm()
{
// get default template id
$defaultTemplateId = BackendModel::getModuleSetting($this->getModule(), 'default_template', 1);
+ $hideContentTitle = (isset($this->record['data']['hide_content_title'])) ? $this->record['data']['hide_content_title'] : false;
// create form
$this->frm = new BackendForm('edit');
@@ -210,6 +211,7 @@ private function loadForm()
$this->frm->addEditor('html');
$this->frm->addHidden('template_id', $this->record['template_id']);
$this->frm->addRadiobutton('hidden', array(array('label' => BL::lbl('Hidden'), 'value' => 'Y'), array('label' => BL::lbl('Published'), 'value' => 'N')), $this->record['hidden']);
+ $this->frm->addCheckbox('hide_content_title', $hideContentTitle);
// a god user should be able to adjust the detailed settings for a page easily
if($this->isGod)
@@ -442,6 +444,7 @@ private function validateForm()
$redirectValue = $this->frm->getField('redirect')->getValue();
if($redirectValue == 'internal') $this->frm->getField('internal_redirect')->isFilled(BL::err('FieldIsRequired'));
if($redirectValue == 'external') $this->frm->getField('external_redirect')->isURL(BL::err('InvalidURL'));
+ $data['hide_content_title'] = ($this->frm->getField('hide_content_title')->getChecked());
// set callback for generating an unique URL
$this->meta->setURLCallback('BackendPagesModel', 'getURL', array($this->record['id'], $this->record['parent_id'], $this->frm->getField('is_action')->getChecked()));
@@ -465,6 +468,7 @@ private function validateForm()
if($this->frm->getField('is_action')->isChecked()) $data['is_action'] = true;
if($redirectValue == 'internal') $data['internal_redirect'] = array('page_id' => $this->frm->getField('internal_redirect')->getValue(), 'code' => '301');
if($redirectValue == 'external') $data['external_redirect'] = array('url' => $this->frm->getField('external_redirect')->getValue(), 'code' => '301');
+ $data['hide_content_title'] = ($this->frm->getField('hide_content_title')->getChecked());
// build page record
$page['id'] = $this->record['id'];
View
4 backend/modules/pages/installer/data/locale.xml
@@ -351,6 +351,10 @@
<translation language="hu"><![CDATA[A cím, amely megjelenik a menüben.]]></translation>
<translation language="es"><![CDATA[El título que se muestra en el menú.]]></translation>
</item>
+ <item type="message" name="HideContentTitle">
+ <translation language="nl"><![CDATA[Verberg de titel op de pagina.]]></translation>
+ <translation language="en"><![CDATA[Hide the title on the page.]]></translation>
+ </item>
<item type="message" name="HomeNoBlock">
<translation language="nl"><![CDATA[Er kan geen module gekoppeld worden aan de home-pagina.]]></translation>
<translation language="en"><![CDATA[A module can't be linked to the homepage.]]></translation>
View
3  backend/modules/pages/layout/templates/add.tpl
@@ -276,6 +276,9 @@
<p>
<label for="isAction">{$chkIsAction} {$msgIsAction}</label>
</p>
+ <p>
+ <label for="hideContentTitle">{$chkHideContentTitle} {$msgHideContentTitle}</label>
+ </p>
{option:isGod}
<ul class="inputList">
{iteration:allow}
View
3  backend/modules/pages/layout/templates/edit.tpl
@@ -316,6 +316,9 @@
<p>
<label for="isAction">{$chkIsAction} {$msgIsAction}</label>
</p>
+ <p>
+ <label for="hideContentTitle">{$chkHideContentTitle} {$msgHideContentTitle}</label>
+ </p>
{option:isGod}
<ul class="inputList">
{iteration:allow}
View
1  frontend/core/engine/page.php
@@ -365,6 +365,7 @@ protected function processPage()
// assign content
$this->tpl->assign('page', $this->record);
+ if(isset($this->record['data']['hide_content_title']) && $this->record['data']['hide_content_title'] === true) $this->tpl->assign('hideContentTitle', true);
// set template path
$this->templatePath = FRONTEND_PATH . '/' . $this->record['template_path'];
Something went wrong with that request. Please try again.