| | | |  |  | |  |
06.04.2004, 22:44
|
#1 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 35
| Hide titles of modules How do I hide titles of modules when they have nothing to display.(I thought I saw an answer to this on the mambo forums, but no matter how hard I search I can't find it again)
Thanks,
Congrats on the new forum  |
| |
06.04.2004, 22:56
|
#2 (permalink)
| | Mamber
Join Date: Apr 2004 Location: Dallas, TX
Posts: 71
| Re: Hide titles of modules This one, I know. Put this in your template:
<?php if ( mosCountModules( 'user1' ) > 0 ) { ?>
<?php mosLoadModules ( 'user1' ); ?>
<?php }; ?>
Obviously, replace 'user1' with whatever module you want to show/hide depending on content. Anything after the if call will get displayed. Look at the PeakLime template for example of this in action.
Cheers, |
| |
06.04.2004, 22:58
|
#3 (permalink)
| | Expert Mamber
Join Date: Mar 2004
Posts: 202
| Re: Hide titles of modules There is a setting in the Administrator. All you have to do is edit the module and you will see a setting for "Hide Title?" |
| |
06.04.2004, 23:07
|
#4 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 35
| Re: Hide titles of modules Thanx,
I am going to give this a shot,
I think what the above answer does is manage the display of right, left.... so on. The thing I am curious about is a module title, like related items that only displays(for example) inside column right when there is actual content in the module displayed inside column right.
or... I have never figured this out, if I want to call a module out to display inside a template without it appearing inside of any of the standard mosloadmodule calls. or maybe create a custom well. |
| |
06.04.2004, 23:13
|
#5 (permalink)
| | Senior Mamber
Join Date: Apr 2004 Location: Mo i Rana, Norway (66°19'N 14°09'E)
Posts: 214
| Re: Hide titles of modules I am afraid all of the answers is wrong.  I asked that question on Mamboserver some months ago. - lazarus's answer will hide the user1 area if no modules is published there. A module that has no output, but is published here WILL show up.
- keliix06's answer will hide the title for the module regardles of it has any output.
And the answer I got was that it was not possible without some major core hacks 
__________________ "Every demand is a prison, and wisdom is only free when it asks nothing." Sir Bertrand Russell |
| |
06.04.2004, 23:23
|
#6 (permalink)
| | Expert Mamber
Join Date: Mar 2004
Posts: 202
| Re: Hide titles of modules OK, just re-read the question. Certainly not something you could do with a major hack. You woulf have to have the code for the title only display if it found text coming through for the module mody, and that would not be an easy task. |
| |
06.04.2004, 23:30
|
#7 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 35
| Re: Hide titles of modules thx guys, saved me a bunch of time |
| |
06.04.2004, 23:32
|
#8 (permalink)
| | Senior Mamber
Join Date: Apr 2004 Location: Mo i Rana, Norway (66°19'N 14°09'E)
Posts: 214
| Re: Hide titles of modules Big job indeed! And it would only work with the modules that lets Mambo take care of printing out the content via $content, and not all the naughty modules that do the job themselves.
__________________ "Every demand is a prison, and wisdom is only free when it asks nothing." Sir Bertrand Russell |
| |
06.04.2004, 23:40
|
#9 (permalink)
| | Mamber
Join Date: Apr 2004 Location: Dallas, TX
Posts: 71
| Re: Hide titles of modules 1 other thing to consider, Romanus -- using multiple templates for home page / sub pages. It allows you to change the arrangement and layout of modules depending on what section of the site you are in... That might prevent the need to call an empty module on pages where it isn't relevant.
Best approach I've seen to multi-template (requires no core hacks) is: http://forum.mamboserver.com/viewtop...?p=54006#54006
Essentially you replace your index.php template page with a switch statement that calls various templates depending on what section the person is browsing.
Takes a minute to get your head around, but once you do, it's pretty powerful. |
| |
08.04.2004, 02:29
|
#10 (permalink)
| | Junior Mamber
Join Date: Apr 2004
Posts: 35
| Re: Hide titles of modules thx, been meaning to dive into that |
| | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT +2. The time now is 09:06. | | | |