I would like to remove the 'Publishing', 'Language' and 'Metadata' options from the frontend.
Does anyone know how this can be done?
Any help would be greatly appreciated! Thank you!
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityI would like to remove the 'Publishing', 'Language' and 'Metadata' options from the frontend.
Does anyone know how this can be done?
Any help would be greatly appreciated! Thank you!
Copy this file :[root]/components/com_content/views/form/tmpl/edit.php
to [root]/templates/your_active_template/html/com_content/form/edit.php
then open and delete line 75 to 77
<li><a href="#publishing" data-toggle="tab"><?php echo JText::_('COM_CONTENT_PUBLISHING') ?></a></li>
<li><a href="#language" data-toggle="tab"><?php echo JText::_('JFIELD_LANGUAGE_LABEL') ?></a></li>
<li><a href="#metadata" data-toggle="tab"><?php echo JText::_('COM_CONTENT_METADATA') ?></a></li>
You can also delete line 123 to 159 , for remove the form completely :
<div class="tab-pane" id="publishing">
<?php echo $this->form->renderField('catid'); ?>
<?php echo $this->form->renderField('tags'); ?>
<?php if ($params->get('save_history', 0)) : ?>
<?php echo $this->form->renderField('version_note'); ?>
<?php endif; ?>
<?php echo $this->form->renderField('created_by_alias'); ?>
<?php if ($this->item->params->get('access-change')) : ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('featured'); ?>
<?php echo $this->form->renderField('publish_up'); ?>
<?php echo $this->form->renderField('publish_down'); ?>
<?php endif; ?>
<?php echo $this->form->renderField('access'); ?>
<?php if (is_null($this->item->id)):?>
<div class="control-group">
<div class="control-label">
</div>
<div class="controls">
<?php echo JText::_('COM_CONTENT_ORDERING'); ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="tab-pane" id="language">
<?php echo $this->form->renderField('language'); ?>
</div>
<div class="tab-pane" id="metadata">
<?php echo $this->form->renderField('metadesc'); ?>
<?php echo $this->form->renderField('metakey'); ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
<?php if ($this->params->get('enable_category', 0) == 1) :?>
<input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" />
<?php endif; ?>
</div>
Assuming your form instance is in variable $this->form
like it's on core components.
In your edit.php
add these lines.
$this->form->removeField('state');
$this->form->removeField('language');
// Remove metadata group fields
$this->form->removeGroup('metadata');
Tested on Joomla! 3.4.4.