SimplePortal
Customization => Custom Coding => Topic started by: AciD on April 27, 2010, 02:35:08 PM
-
Hi,
How can i remove (http://j.imagehost.org/0818/Obrazek1.jpg) menu and navigation bar on portal?
-
Do you mean the menu bar at the top of the page?
-
Yes, and navigation bar.
Look screenshot (http://j.imagehost.org/0818/Obrazek1.jpg)
-
I may be wrong BUT I think it may not be possible.
SP is added to the forum as a mod so removing the menubar would remove the menu from all the pages within the forum and not just the portal.
-
It could be done. SimplePortal itself can figure out if it should be showing the portal page. So this same detection could be applied in a template layer.
I don't know the guts of SMF and SimplePortal as well as the devs and experienced customizers. I think you could try modifying template_menu with something like
if ( sportal_catch_action == 'sportal_main' ) return;
-
How you do this, will depend on the theme that you are using...
Here is my solution for the default curve theme (SMF 2 only):
// Show the menu here, according to the menu sub template.
template_menu();
echo '
<br class="clear" />';
// Show the navigation tree.
theme_linktree();
// Show the menu here, according to the menu sub template.
if (empty($context['main_portal_page']))
{
template_menu();
echo '
<br class="clear" />';
// Show the navigation tree.
theme_linktree();
}
$context['page_title'] = $context['forum_name'];
$context['page_title'] = $context['forum_name'];
$context['main_portal_page'] = true;
-
Thank you very much Nathaniel!
It works, result (http://j.imagehost.org/0636/spnobar.jpg).
-
The image you posted doesn't work, though. I was eager to see what you'd done with the idea.
-
The image works fine for me...
Looking good AciD. :)