Menu Assignment? Topic is solved
Moderator: General Support Moderators
Forum Rules
Absolute Beginner’s Guide to Joomla! <-- please read before posting.
Forum Post Assistant – If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Intern
- Posts: 63
- Joined: Sun May 18, 2008 10:01 pm
Menu Assignment?
I have a slider module that I want to appear on a specific menu option that list articles in category blog view, using menu assignment I’m able to do this, the only problem is that once an article is selected the slider remains too. I only want the slider to appear on this list of articles in that category, not when an article is showing. I can’t see an option for this in menu assignment, is there an easy way around this?
Many thanks.
- Joomla! Champion
- Posts: 6259
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Menu Assignment?
Do you have an example link you can show us the behaviour you’re not wanting to see? (or screenshots, if the site is not live)?
Perhaps, you need to make menu items for those articles in that category but make them hidden menu items (so they are not displayed on any menu, but are still selectable for “menu assignment” in the Module Manager). To my way of thinking that’s how it would work, when you click the link from the Category Blog view, it should then load the article with with that slider showing.
————————————————————–
A Murray
Help you I can, yes!. Post your question, you should. Keep it on topic you must!
Use the Forc….Forum Post Assistant my young Padawan!
- Joomla! Master
- Posts: 27352
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Menu Assignment?
If you have two menu itens pointing to the same category, it may pick the one with the lowest ID number.
-
- Joomla! Intern
- Posts: 63
- Joined: Sun May 18, 2008 10:01 pm
Re: Menu Assignment?
- Joomla! Master
- Posts: 27352
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Menu Assignment?
Embed the module in the intro text and set not to show intro text in single article view.
-
- Joomla! Explorer
- Posts: 330
- Joined: Fri Dec 02, 2005 10:46 am
- Location: The Netherlands
Re: Menu Assignment?
I create my own templates and use this often:
Open your template’s index.php file.
Check for the line
Code: Select all
$view = $app->input->getCmd('view', '');
If it’s not there add it, somewhere at the beginning. See for example the Protostar template.
Then look for the position of the slider:
(*mySliderPosition is an example.)
Code: Select all
countModules('mySliderPosition')) : ?>
and change it to:
Code: Select all
countModules('mySliderPosition') && $view != "article") : ?>
This will display modules on all assigned pages, but not on articles.
-
- Joomla! Intern
- Posts: 63
- Joined: Sun May 18, 2008 10:01 pm
Re: Menu Assignment?
-
- Joomla! Intern
- Posts: 63
- Joined: Sun May 18, 2008 10:01 pm
Re: Menu Assignment?
Code: Select all
// Adjusting content width if ($this->countModules('position-7') && $this->countModules('position-8')) { $span = 'span6'; } elseif ($this->countModules('position-7') && !$this->countModules('position-8')) { $span = 'span9'; } elseif (!$this->countModules('position-7') && $this->countModules('position-8')) { $span = 'span9'; } else { $span = 'span12'; }
Code: Select all
countModules('position-1')) : ?>
Code: Select all
countModules('position-8')) : ?> countModules('position-7')) : ?>
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Dec 08, 2020 5:53 am
Re: Menu Assignment?
how are you?
-
- Joomla! Explorer
- Posts: 330
- Joined: Fri Dec 02, 2005 10:46 am
- Location: The Netherlands
Re: Menu Assignment?
I recomend making a copy of protostar and use the copy as the template for your website.
Else these changes will be changed back after a Joomla update.
Anyway…
Find
Code: Select all
and change it to
Code: Select all
or to this
Code: Select all
countModules('position-3') && $view != "article") : ?>
The first snippet of code is good for you.
The second is good if you want to add extra code, like a container (See i.e. position-1, -7 or -8)
-
- Joomla! Intern
- Posts: 63
- Joined: Sun May 18, 2008 10:01 pm
Re: Menu Assignment?
