// adding to show bottom blocks in all mods
else { blocks('Down');
}
The problem is here - as News is my home_file - when someone reads a news article I get all the center blocks I had defined for the home page - or in the case - the news module - on the article page.
Is there a way to say something like if its the home-file but not the home page? Is there an identifier for the home page? like If (defined(home_file)) && Home_page="False" then no blocks down?
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Tue Jul 07, 2009 7:55 am
Interesting. I have been looking at a problem like this too. I'd like to use one of the content pages as my "home page" but RN insists on having a home module and if you make content be the main module you get all the header stuff associated with it and the list of all content pages. And using standard RN (derived from *nuke) you HAVE TO have a home module. The name of that module gets stored in the _main table ... look at modules.php in the admin directory to see how.
Without rewriting the code the only workaround I can see for this is to create a do-nothing module (I think I've posted the code for that here at some time) that doesn't have any output and make that be the main module. Then use whatever blocks you want on your home page using center up and center down. By the way, center blocks are not defined on a per module basis ... they are universal no matter what module you put in home.
//modified to display center blocks everywhere but article pages
if(($name == 'News') AND ($file == 'article')) {
//do nothing because top blocks on article pages is annoying
} else if((defined('HOME_FILE')) AND ($file != 'article')) {
//display the message box only on the home page but not on article pages
//this is done in case the module news is the home module
message_box();
blocks('Center');
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum