Hide Columns When Editing the Front End of Joomla
Tuesday, 20 July 2010 10:21

Editing articles from the front end of a Joomla website is one of its most useful features. Sometimes, however, if you have both a left and right column, when you try to edit, the editor screen/panel will overlap the right columns and make it difficult to read.

There is a simple trick to you do to hide columns, by adding a conditional statement to the place in the template index.php where the right column occurs.

Somewhere you will probably have a statment where the right column module output is processed.

<?php if ($this->countModules( 'right' ) 
&& JRequest::getCmd('task') != 'edit' ) : ?>
<div id="rightcol">
<jdoc:include type="modules" name="right" style="rounded" />
</div>
<?php endif; ?>

You can see with the addition of && JRequest::getCmd('task') != 'edit' it will also check to see if an editor is running. If there is, the right column will not be shown and there will be more space for the editor (assuming the template has fluid center column)

 


blog comments powered by Disqus
 

Joomlashack University!

If you want online classes delivered to the comfort of your own home, then you need to join Joomlashack University - an affordable online Joomla training course taught by the world's leading experts in Joomla education.

If you are struggling with Joomla and want expert help, then fill out the form below. We'll send you some more information and you'll be first in line join the easiest and fastest way to learn Joomla.



Get Joomla Tips by RSS or Email

 

Joomla 1.5 BookGet the Joomla 1.5 Book

Get the #1 best-selling about Joomla 1.5 from Amazon and free access to the companion site, joomlabook.com.