Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Problem removing main body content

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hello

I have read the forum posts re this topic and I watched the video - t3-framework.org/documentation/layout-system.html

But I can't seem to remove the mainbody content either by setting the main and sidebars to 'None' in the backend Template layout or by by cloning a php file and removing the mainbody loadBlock

In the layout php files I can see this and I removed it:

<?php if(!$hide_mainbody) {

$this->loadBlock ('mainbody');
} ?>

Removing this comment doesn't work. I'm obviously missing something. I just get a blank box at the bottom of the page where the mainbody should be where the page has no article.

Any clues?
  • Leon Cuzzilla's Avatar
  • Leon Cuzzilla
  • LIfetime Developer - Big Bamboo
  • 110 posts
  • Karma: 0
The administrator has disabled public write access.
Sorry I'm not quite clear - have you tried the option at the bottom of the layout tab in the template settings?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
In the layout tab in the template settings there is an option to remove main content body from the home page. This works fine but if I want to remove it from some of the inner pages where I only have module positions I can't.
  • Leon Cuzzilla's Avatar
  • Leon Cuzzilla
  • LIfetime Developer - Big Bamboo
  • 110 posts
  • Karma: 0
The administrator has disabled public write access.
With the template style that has the option "remove main body content" is that assigned to the relevant pages?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Sorry I'm not sure how to do this - can you explain a bit further please
  • Leon Cuzzilla's Avatar
  • Leon Cuzzilla
  • LIfetime Developer - Big Bamboo
  • 110 posts
  • Karma: 0
The administrator has disabled public write access.
There is the assignment option on a template style - you can assign a template style so it displays rather than the default template style / version

I'm a bit confused with what you are looking to do regarding

"This works fine but if I want to remove it from some of the inner pages where I only have module positions I can't."

So I may be barking up the wrong tree
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hello, sorry to go over the same point but in Template Styles I use a custom theme I set up and several different pages with layout styles eg

The home page style is called Canegrowers - home and has it's own Layout called all-positions-homepage.
In additional layout settings I have set Remove mainbody output from homepage to On as I have no articles on this page.

ScreenShot2014-10-14at12.57.26pm.png


For a page that only shows modules the style is called Canegrowers - Modules Only and has it's own Layout called Canegrowers - modules only

The only options I can see to remove the main content only applies to the homepage so I still can't see how to remove that mainbody content from my modules only layout.
  • Leon Cuzzilla's Avatar
  • Leon Cuzzilla
  • LIfetime Developer - Big Bamboo
  • 110 posts
  • Karma: 0
The administrator has disabled public write access.
I will need to get back to you on this one after talking to the developers

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
sorry I've been leading you up a blind ally with with this

You need to clone the layout in the template layout tab and give it a new unique name

Assign the new layout to the relevant page
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
In the new layout file you created

path \templates\base3\local\tpls

in this case I called the file all-posiitons-paul

Then remove this

<?php if(!$hide_mainbody) {

$this->loadBlock ('mainbody');
} ?>

I've just tried this locally and it works fine using above

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
ok thanks Paul, I'll give this a go now and let you know how I got on! :)
  • Leon Cuzzilla's Avatar
  • Leon Cuzzilla
  • LIfetime Developer - Big Bamboo
  • 110 posts
  • Karma: 0
The administrator has disabled public write access.
Excellent - that seems to have done the trick!
  • Leon Cuzzilla's Avatar
  • Leon Cuzzilla
  • LIfetime Developer - Big Bamboo
  • 110 posts
  • Karma: 0
The administrator has disabled public write access.
Cool sorry for the initial confusion

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The following user(s) said Thank You: Leon Cuzzilla

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers