Thursday, 30 October 2014 14:30
beggarly

No Menu Item Type

No Menu Item Type

Postby joomla » Sat Jan 19, 2013 2:12 pm

Hello, Featured Categories is exactly what I am after for my homepage.
I have downloaded, but it does not come up in my menu item type. I have added the new module position and so have it showing up on my homepage, but also have to have the home menu item type set - so now have the module as well as an article on my homepage. How do I turn off the home menu item type (is that possible?) or should featured categories be showing up as a new menu item type?
Very new to all this - appreciate any help. Thanks.
joomla
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sat Jan 19, 2013 2:03 pm

Re: No Menu Item Type

Postby chus » Sun Jan 20, 2013 9:20 pm

Hi,

No, no module will show up as another menu item type, only components can do so.

But you should be able to edit your "Home" menu item in order to show no articles at all.

Regards!
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: No Menu Item Type

Postby joomla » Wed Jan 23, 2013 12:55 pm

Ok, I may have made this more complicated than it needed to be....I edited the index.php to not show the main component on the homepage, BUT I already had edited it to show a different div if there were no modules on the right.

Now the homepage works great, but I can no longer display the component on pages with no right modules.

Have I got this the wrong way round, or is it too much going on?

Thank you!

<div id="contentwrapper">

<?php if($this->countModules('right')):?>
<div id="right">
<div id="right1"><jdoc:include type="modules" name="right1" style="xhtml"/></div>
<div id="right2"><jdoc:include type="modules" name="right2" style="xhtml"/></div>
<div id="right3"><jdoc:include type="modules" name="right3" style="xhtml"/></div>
<div id="right4"><jdoc:include type="modules" name="right4" style="xhtml"/></div>
<div id="right5"><jdoc:include type="modules" name="right5" style="xhtml"/></div>
</div>


<?php if (JRequest::getVar('view') != 'frontpage'): ?>
<div id="content">
<?php else:?>
<div id="contentnoright">
<?php endif;?>

<jdoc:include type="message" />
<jdoc:include type="component" /></div><?php endif ?>

<div id="banner"> <jdoc:include type="modules" name="banner" style="xhtml"/></div>
<div id="featcat"><jdoc:include type="modules" name="featcat" style="xhtml"/></div>

</div>

</div>
joomla
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sat Jan 19, 2013 2:03 pm

Re: No Menu Item Type

Postby joomla » Wed Jan 23, 2013 2:34 pm

I think I have solved this by removing:

<?php if (JRequest::getVar('view') != 'frontpage'): ?>
<div id="content">
<?php else:?>
<div id="contentnoright">
<?php endif;?>

<jdoc:include type="message" />
<jdoc:include type="component" /></div><?php endif ?>

and replacing it with:

<div id="content">
<?php else:?>
<div id="contentnoright">
<?php endif;?>


<jdoc:include type="message" />

<?php
$menu = &JSite::getMenu();
if ($menu->getActive() != $menu->getDefault()) {
?>
<jdoc:include type="component" />
<?php } ?>

It seems to work well now, but if anyone has any better suggestions....!
thanks
joomla
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sat Jan 19, 2013 2:03 pm

Re: No Menu Item Type

Postby wwebb » Thu Jan 24, 2013 8:09 pm

Hello-

You do appear to be making this too complicated. I'm no expert, but my understanding is that you should not have to, and it is best not to, edit the Joomla! index file (unless you have developed your own Template). Every time you update Joomla! or your Template to a new version, your edits will be overwritten.

Your topic is really a general "how to develop a Joomla! site" topic not a Featured Categories topic, but here are a few tips.

1) Always state the Joomla! version you are using, and typically also the Template you are using, so everyone knows the basics of your environment which can be very different. I'm using Joomla! 2.5 so that is my context.

2) If you want a MODULE (such as Featured Categories) to be the main content of your home page, you do NOT need to add a module position or hack the index file. You can create an Article that embeds the Module, and then set your home menu item to display that "Single Article".

To show a Module in an Article, there is a standard Plug-In named "Content - Load Module in Article". Look at it Plug-in Manager for usage details, but basically in your home page Article you will type in something like: {loadmodule mod_featcats}

I installed and like another Plug-in from the Joomla! Extension directory, called "Load Module Into Article" (it is free). If you want different Featured Categories pages, you will need this so you can make a different instance of Featured Categories module for each page.

Enjoy learning Joomla!
---wwebb
wwebb
Fresh Boarder
Fresh Boarder
 
Posts: 6
Joined: Tue Jan 15, 2013 7:40 pm

Re: No Menu Item Type

Postby joomla » Mon Jan 28, 2013 3:49 pm

Thank you wweb,

I am indeed developing my own template, which is why I thought it must be more complicated, when infact all I needed to do was insert the module into an article! I shall look at the plug-in you suggest.

Many thanks.
joomla
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sat Jan 19, 2013 2:03 pm


Return to Featured Categories



Who is online

Users browsing this forum: No registered users and 1 guest