Dragonfly CMS v9 ⇒ Modules & Blocks :: Archives ⇒ Why are my center blocks showing above articles? :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

Archived ⇒ Why are my center blocks showing above articles?


when i post a news article to the site
www.antifmradio.com/dragonfly2

i click on the READ MORE link in the article

i get the FULL LENGTH article showing at the bottom of the page

and above it is all of my CENTER blocks

why are they showing and not JUST the article?

antifmradio.com/dragon...&sid=1

Please enter your server specs in your user profile! 😢


9.1.2.1 now lets you show Center Up and Down blocks in any module - not just the Home "module" now.
Go into Admin - blocks, click Edit on the Center Up blocks that you don't want to show in News... OH, your Home module is news... What I was going to suggest is look at the section labeled "Show in module" for each block and deselect News, but that will also turn it off for Home. Nano had mentioned adding a "Home" module similar to the "Admin Control" so you could select blocks to show in Home, but not the actual full module, but I don't know if he got anywhere with that.
I know there's a thread or 2 around here discussing work-arounds...

Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.27-grsec/Apache 2.2.11/MySQL 5.0.67-community-log/PHP 5.2.8/DF 9.2.1


I "fixed" it for one site like this:

Open themes/THEME_NAME/theme.php

Search for function themeheader() {
And under that is
global ...
Check if there are $module_name and $home
If not, then add them to the end for example like this:

BEFORE:
global $slogan, $sitename, $banners, $mainindex, $adminindex, $index, $cpgtpl;

AFTER:
global $slogan, $sitename, $banners, $mainindex, $adminindex, $index, $cpgtpl, $module_name, $home;

Now move down in the file where is
$cpgtpl->assign_vars(array(
And after that add
'POLE_UUDISED' => ($module_name != 'News') || $home,

Save the file.

Open themes/THEME_NAME/template/header.html

Search <!-- BEGIN centerblock --> and before that add <!-- IF POLE_UUDISED -->
So it'll be
<!-- IF POLE_UUDISED --><!-- BEGIN centerblock -->

Search for <!-- END centerblock --> and after that add <!-- ENDIF -->, so it'll be
<!-- END centerblock --><!-- ENDIF -->

Save the file.

Done!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
-


rlgura thanks for the attempt

eastlane thanks for the fix
it works just fine

Please enter your server specs in your user profile! 😢


Yea, wish this would go into the new changes. Nice work eestlane, hadnt gotten around to fixing it yet myself! Smile

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Well in real release it should be more advanced, with and option for admin, wouldn't be too hard to do actually. But I am not the one who decides this.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
-


Is it possible to remove the bottom center block from the module view if that module is set to be the Home module?

Edit: Nevermind, I figured it out. I should learn to try before asking. Thanks for the tip Eestlane. Your help is appreciated, as always.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Devuan beowulf / Apache 2.4.46 / MariaDB 10.3 / PHP 7.4 / DF 9.x (updated)

Last edited by warden on Fri Aug 24, 2007 5:41 pm; edited 1 time in total


You could just remove the module from the bottom center block's allowed modules. In admin-blocks->your_block.

That's in case if it doesn't matter if that module would be home or not.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
-


I figured it out by using your above mentioned instructions. I just altered the theme.php file and added:
'POLE_BTDISED' => $module_name == 'News' && !$home,


Then I added the same Else If statement (with the two letter difference) to the footer.html file. It works fine. Thanks.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Devuan beowulf / Apache 2.4.46 / MariaDB 10.3 / PHP 7.4 / DF 9.x (updated)

All times are UTC