[13]Additional logic in Module Manager Menu Item Assignment

bradnana
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Fri Feb 15, 2008 11:19 pm

[13]Additional logic in Module Manager Menu Item Assignment

Post by bradnana » Sun Feb 17, 2008 3:05 am

1. Introduction-

It is currently only possible to assign modules to menu items in one of three ways:

ALL - the module will show on all page views.
NONE - the module will show on no page views.
SELECT- the module will show on the selected page views.

It is not currently possible to assign modules to menu items in a selective/exclusive manner, i.e. a module cannot be set to "show on ALL page views EXCEPTthose specified".

2. Problem-

Because modules cannot be assigned in an exclusive manner, it becomes difficult to manage the layout of complex wesites.

Eg. A site may contain two page views- Home & Page View 1- and two articles- Article 1 & Article 2. The site contains two menu items- Home which is a Front Page Blog Layout and Link 2 which is an Article Layout to Article 1. Several modules are published on the site. Module 1 is assigned to ALL Menu Items. Module 2 is assigned to NONE. Module 3 is assigned only to the Home Menu Item. Module 4 must show on all site page views except Home and so is assigned to Link 2.

Module 1, Module 2 and Module 3 function as needed for proper site structure. Module 1 shows on all page views. Module 2 never shows on any page views. Module 3 only shows on the Home page view. At first glance, Module 4 also seems to function correctly. When a user selects Article 1, they see Module 4. This occurs regardless of whether the user selects Article 1 by clicking the Link 2 Menu Item or the linkable title to Article 1 or a 'Read more' link on Article 1. However, the site structure calls for Module 4 to appear on all page views except Home. Therefore, when a user selects the linkable title of Article 2 or a 'Read more' link on Article 2, Module 4 fails to appear on the resulting page view.

I do not believe this is a bug but rather a failure to include complete logic in Menu Item assignment.

3. Current workaround-

The only current workaround to this issue is to create a Menu Item for each Article on a site and specifically assign the appropriate Modules to those Menu Items. To keep the Menu on the site from growing too large, these Menu Items can be placed in a separate Menu which can be left unpublished. The Menu Items, however, must be published to the Menu.

On very large sites or sites with frequent Article creations, this workaround quickly becomes unwieldy.

4. What is needed-

To complete the logic, Menu Item assignment should include the following 4 possible scenarios:

ALL - works on all page views. (Positive inclusive logic)
NONE - works on all page views. (Negative inclusive logic)
SELECT (or ACCEPT)- works on selected page views. (Positive exclusive logic)

These are available, but this is missing:

EXCEPT- works on selected page views. (Negative exclusive logic)

5. Implementation-

5.1 Code changes-
5.1a Current code-

to be added

5.1b Additional code-

to be added

5.2 User Interface changes-

Here is what we have:

Image

And here is what we need:

Image

6. Compatability-

This fix should pose no issues with backward compatability since it does not affect the current logic implemented in the application. It only presents an additional logical level. Previously configured Menus, Menu Items and Modules would still function as they have been configured. The administrator would simply have the added ability to exclude modules from specific pages.

7. References-

http://forum.joomla.org/viewtopic.php?f=428&p=1203860

ewel
Joomla! Guru
Joomla! Guru
Posts: 522
Joined: Mon Oct 01, 2007 11:35 am

[15]Additional module assignment options

Post by ewel » Sun Feb 17, 2008 10:49 pm

Subject
This small whitepaper proposes options determining where modules are displayed by way of various fairly easy to implement checks which are additional to but separate from the current menu-driven assignment mechanism.



Current Issue
Currently, modules are visible on a page dependent on the Menu Assignment settings in the module settings. These settings will assign a module to one or more menu items, and as long as the selected menu item(s) applies to a page the module will be displayed on that page. This system does not offer much precision in the placement of modules on a site, and as already pointed out in this forum (http://forum.joomla.org/viewtopic.php?f=500&t=266002) it does not allow exclusion.

Few websites have a menu item for each page. With the current system it is not possible to assign a module to pages without a menu item. Administrators may want to assign modules to types of pages, such as category blogs. With the current system assigning a module to a category blog menu item would cascade down to the pages accessed from the category blog. More examples could be presented but I refer to the below list of possible checks to let the individual imagination of the reader flow freely.



Proposed Solution
In the module settings additional settings can be added to determine where modules are displayed and where not. It would be possible to use each of the additional settings either as an exclusion or as an inclusion.

Examples of possible settings are the following: All content items; All category blogs; All category tables; All section blogs; All section tables; All sections, categories and content items; All sections, categories, content items and front page; All core components except front page and content; All core components except registration, login and user; All registration, login and user components; All components except standard Joomla components; All standard Joomla components; All components; Content page specified by alias; Content page specified by alias; Categories specified by id (optionally cascading to all pages in specified category(s)); Sections specified by id (optionally cascading to all pages in specified section(s)); Components specified by name; User defined condition; Pages with url containing user a defined phrase.



Technical implementation
The checks to perform for these settings are fairly easy and are feasible. In fact I have just finished a module to display other modules which I plan to put in the extensions directory after some further testing. The above list of possible settings is taken from the settings of this module. If this proposal is accepted I will gladly provide the code of this module as input.

Generally, it simply compares parameters with the request, for example: $layout = JRequest::getVar('layout'); if ($layout=="blog"). So, all it needs is what already exists in Joomla.

I imagine the checks would be implemented by adding code similar to that of my module as a class somewhere in the mechanics through which modules are published.


Impact
As far as I can see there would be no backwards compatibility issue other than that a site migrated from an older version would have empty settings, and a site migrated to an older version (if any) would have redundant settings and modules might appear in unexpected places in accordance with the menu assignment module settings.

The code can be very light and can be kept on the side of the server, so it should have little or no discernible impact on the loading speed of a page.

herb200mph
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3211
Joined: Sun Jun 25, 2006 12:12 am
Location: Salisbury, NC/USA (N. of Charlotte)
Contact:

Re: Additional logic in Module Manager Menu Item Assignment...

Post by herb200mph » Mon Feb 18, 2008 4:09 pm

I would like to add a footnote suggestion to cross-assignment of layouts/menu link items.

Currently, the assignment is accomplished at the module level, selecting which menu link item to which a module is or is not assigned.

Given the fact that there are likely to be "less modules" on a site than "menu link items" - a list that can get lengthy, I would also like to see:

A method whereby, when a menu link item is created, a Paraments-Module Assignment List is created based on existing template modules, so that the menu link item can be assigned or not assigned to a module.

It would be much more intuative and convenient to make the selection in a one-step process at the time the menu link item is created, instead of having to drill deeper and open each module and make the menu link assignment therein.

One admin screen for menu link creation and assignment to ALL/NONE/SELECT on the same screen.
http://www.200mphMedia.net
Author: Joomla! 3: Boot Camp book @ Amazon.com

Stian
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 247
Joined: Sat May 20, 2006 7:58 am
Location: Norway

Re: Additional logic in Module Manager Menu Item Assignment...

Post by Stian » Mon Feb 18, 2008 7:36 pm

I would also be helpfull if you could assign a module to an entire menu, instead of individual items. That way you could add new items to that menu, and not need to add the modules as well. I guess this could be accomplished with the EXEPt method, but is a another way of looking at it...

Stian

bradnana
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Fri Feb 15, 2008 11:19 pm

Re: Additional logic in Module Manager Menu Item Assignment...

Post by bradnana » Mon Feb 18, 2008 8:26 pm

Stian wrote:I guess this could be accomplished with the EXEPt method, but is a another way of looking at it...
Stian
This would somewhat be accomplished using the EXCEPT method, but again the logic would be incomplete because it would be possible to assign a module to an entire menu and it still not show up on all page views. It would show up on all of that menu's item link page views, but not necessarily on page views generated by Joomla that are not explicitly associated with the menu's link items.

It's a great idea though. To be able to select a menu name from the list and have the selection (ACCEPT or EXCEPT) apply to all future menu item changes or additions would certainly cut down on some of the menu/menu item/module assignment management overhead.

Herb200mph's idea is a great concept, too. But I'm afraid it might be more difficult to implement. Modules and Menu Items essentially have a many-to-many relationship. Therefore, in the same way that the Module Manager interface insludes a list of all menu items to choose from, the Menu Item interface would have to include a list of all 'published' modules to choose from. Not impossible, but just a bit more involved. Still a good idea though since it would drastically reduce the overhead associated with managing assignments.

Do you guys think these features should be added to this white paper or do they justify a separate paper? I'm not sure how much change a single white paper can feature and still be considered 'doable' by the next release. Some developer input would be good here. If they don't think it would be too much, we could add these ideas to the paper. If they think it would slow down getting the change through, we could develop the ideas further in a separate paper.

Stian
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 247
Joined: Sat May 20, 2006 7:58 am
Location: Norway

Re: Additional logic in Module Manager Menu Item Assignment...

Post by Stian » Mon Feb 18, 2008 8:43 pm

bradnana,

personally I would incorporate these ideas into your original paper, since they pretty much evolves around the same concepts, being easier administration of module assignment.

But, I would guess they involve some radical different programming, so it would be nice with some developer input here. There are more than one way to do this, so perhaps more papers with different approaches should be posted?
It would show up on all of that menu's item link page views, but not necessarily on page views generated by Joomla that are not explicitly associated with the menu's link items.
Could you give a specific example here?

Stian

bradnana
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Fri Feb 15, 2008 11:19 pm

Re: Additional logic in Module Manager Menu Item Assignment...

Post by bradnana » Mon Feb 18, 2008 9:18 pm

Sure,

A good example would be a header image. I have a site with a flash header that is fairly large and increases load time slightly. The flash rotates different images. To decrease load time for subsequent pages on my site, I would like to turn off the header flash on all pages except the home page. However, to get a similar effect, I would like to place a random image module to the header position that pulls from the same folder that the flash rotator pulls from. This way, the home page gets a nice animated flash header, but all other pages get a single random image for the header. If I assign the flash module to the header position and the home link, it works great. However, I have to manually assign the random image header on every other page for it to appear. The problem is, I cannot assign it to every possible Joomla generated page view. A Joomla generated page view would include any view that is not explicitly linked to a menu item, E.g. a page generated by clicking a 'Read more' link on an article that does not have a menu item associated with it will show the article in a page view but will not show the random image header. Try it! You'll see.

So, if you assign a module to a menu as a whole so that it appears on any page view related to any menu item included in that menu, all works fine. You have definitely made an improvement to the way modules can be assigned as they would now be assigned dynamically to all new menu items added to that menu. But, you haven't really changed the logic any. There is still no way to tell the module to show up on every page view EXCEPT those explicitly selected.

I may not be doing justice in the way I am describing the issue, but if you try the example, you should see how the problem manifests itself.

User avatar
masterchief
Joomla! Hero
Joomla! Hero
Posts: 2316
Joined: Fri Aug 12, 2005 2:45 am
Location: Brisbane, Australia
Contact:

Re: Additional logic in Module Manager Menu Item Assignment...

Post by masterchief » Tue Feb 19, 2008 10:08 am

This is a really interesting idea. In terms of the schema we could use negative numbers in the jos_modules_menu table (in the menuid column) to indicate an exclude case. We just have to avoid using NOT IN within an SQL statement to support this, otherwise you invoke a full table scan. NOT EQUAL TO is ok though, because you can use and index.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.

gwurst
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Feb 15, 2008 2:08 pm

Re: Additional logic in Module Manager Menu Item Assignment...

Post by gwurst » Wed Feb 20, 2008 4:46 pm

Allow me to throw my 2 cents worth in here. The reason I am looking at this option is in an effort to control menu placement on the front page of the website. I'll simplify the description to make it easy to follow.

Basically, I have 2 menus - Main and Front Page. I want Front Page only on the home page and main on everything else. It's easy to limit Front Page to just the home page, but Main is much more problematic.

Imagine this is the simplified menu setup:

mainmenu
Home
Page 1
Page 2
Page 3


So I want to remove mod_mainmenu from the Home page, I choose select menu items and deselect Home:

mainmenu
Home
Page 1
Page 2
Page 3


The problem occurs when a new menu item is added. Again, to simplify:


mainmenu
Home
Page 1
Page 2
Page 3

Page 4

When Page 4 is added it is automatically excluded from the mod_mainmenu. This happens for any new menu item created at any level. With the All But or Except option any new menu items would automatically be added to mod_mainmenu except the Home page in this example. With many new menu items being created for new articles it becomes quite a hassle to manually select new menu items to add, and leads to a disjointed site. I'm not sure how to code this with PHP, but the logic seems easy to understand if not to implement. I'm really surprised a module or plugin doesn't exist for this currently.

User avatar
spike00
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Wed Jan 25, 2006 10:56 pm
Location: Busto Arsizio (VA) - Italy
Contact:

Re: Additional logic in Module Manager Menu Item Assignment...

Post by spike00 » Wed Feb 20, 2008 5:50 pm

My vote for the EXCEPT possibility.

It's a real need, not only for the reasons described, but also when you have many modules and you create new menu items. Without the possibility to manage this stuff from the menu management (maybe more difficult to implement: more code and more impact) you have to get into each module and assign the new page.

With the except logic (if you choosed it of course) your modules will show up in the new 'page' without doing anything.

User avatar
C.Ludwig
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Sep 20, 2006 10:38 am
Location: München
Contact:

Re: Additional logic in Module Manager Menu Item Assignment...

Post by C.Ludwig » Wed Feb 20, 2008 7:10 pm

Hi,
thank you spike00. This is exactly one of the features I was hoping it would be included in 1.5, but I missed to send my feature wish in time.

I am not sure about the api being used for modules but I think it is the same one as being used by assigned templates and ... - I've seen it more often, but right now I can't remember where ???
So this thread should not been reduced to modules.

But I have some additional, more dificult feature wishes: let's name it 'selected with submenu items' or 'selected with children'.
If I have for example a menu structure like this:
  • Home
  • Products
  • [list]
  • Product 1
  • Product 2
  • ...
  • Product X
[*]Service[/*]
[*]Contact[/*]
[/list]and I want to use a special template or show a special module for all products!
How it works now is that I have to mark every menu item linked to a product (marked red in the tree above). Whenever a new product is added the client has to remeber all modules to be shown on product pages and change their "Menu Assignment" - dear customer, please don't forget to press the 'ctrl key' ;) .
(I don't even talk about unpublished menu items that have to be published first and unpublished after assignment again or was this only possible in 1.0?)

So with a functionality that would first check the current menu item and if there is no entry for the current module, check all parent menu items and use the first one found that maches the module, I only had to select 'Products' in my example and switch to the new option 'Selected with children'.
  • Home
  • Products
  • [list]
  • Product 1
  • Product 2
  • ...
  • Product X
[*]Service[/*]
[*]Contact[/*]
[/list]
There are many, many more possibilties to enhance the module (template) management like:
  • Mixed feature of the new ones: 'All but selected and their children'
  • Radio button to switch between the menu items shown in the selection: 'Show only published menu items' and 'Show all menu items'
  • Coose visibility by Category or Section
But I will be very happy if the new features 'All but selected' and 'Selected with children' would come with V1.6.

Thanks to all developers, you did a great job on V1.5

Christian

bradnana
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Fri Feb 15, 2008 11:19 pm

Re: Additional logic in Module Manager Menu Item Assignment...

Post by bradnana » Thu Feb 21, 2008 12:44 am

Wow! Lots of great input on this. Thanks everyone.

@gwurst and C.Ludwig,

I think your ideas are basically what Stian suggested above. For the sake of communication, lets give the idea a name. Call it 'Whole Menu Selection'. Stian was correct that this is similar to the logic involved in using the EXCEPT method, but there are some differences.

@Stian,

I've thought more about what you were saying and I think I better understand your comment that selecting entire Menus would be similar to using the EXCEPT method "but is a another way of looking at it...". I still think there are subtle differences, though. Particularly, it would seem that the EXCEPT method would require at least one selection be made from the list of Menu Items. To make this automatically include all new addtions to a Menu, a separate Menu/Menu Item would need to be created and perhaps left unpublished that would allow a 'dummy' selection to be made. The effect would be that the module in question would automatically be included on all page views with the exception of the selected 'dummy' Menu/Menu Item. But that requires the administrator to have specific knowledge of this workaround and so is probably not the best way to implement the functionality. I think specifically being able to select entire Menus in the list (and it automatically include all Menu Items in that Menu) is a better alternative.

Apparently lots of folks would like to implement Whole Menu Selection; i.e., having the ability to select entire Menus as opposed to only being able to select Menu Items in the Assignment list box. Instead of implementing this through a clever use of the EXCEPT method, I think it deserves it's own inclusion. However, I am still concerned that because it really is a different feature request distinct from the EXCEPT method and not necessarily required for the EXCEPT method to be implemented that perhaps it should be addressed in a separate paper. That would keep each paper more streamlined and the features easier to implement and therefore more likely to be adopted for the next realease.

To clarify, remember this:

The EXCEPT method will do everything that Whole Menu Selection will do, but Whole Menu Selection will not do everything the EXCEPT method will do. The EXCEPT method provides additional functionality when considering automatically generated page views that are not specifically associated with any Menus or Menu Items.

tightchord
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Mar 20, 2008 7:53 pm

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by tightchord » Thu Mar 20, 2008 9:56 pm

This submission is my attempt to add weight to the following argument:

The addition of this functionality-the "EXCEPT" method of assigning modules to appear on different pages based on their links-is necessary for the easy management of ANY site on which even a single published module that is usually visible, must not appear on a particular page for any reason AND content on that site is submitted on any regular basis, especially by multiple front-end users.

Therefore, the addition of this functionality should be made a high-priority goal in the development of the Joomla! CMS.


And now, humor this coding layman's reflections on the eminent need for this functionality by allowing him to give one real-world example that he suspects would be analogous to the real-life situations of others.

I work with a group of teachers in a small organization-an academic community that is focused on the liberal arts. I have been in the process of helping to set up a Joomla-based site that would not just be attractive and easy to manage from the back end, but would also allow our people to submit news and other articles, editor-level people to proofread the submitted articles, and publisher-level people (probably the editor folks) to publish those articles to the appropriate content areas. They need to be able to log in from the front end and submit, edit, or publish articles so that the content management system doesn't require someone (me, in this case) to perform site management tasks every time an article is published. (That would diminish the value of having Content Management System on a day-to-day basis.)

All of the above is currently possible, but here is an example of where the rubber meets the road, to wit, where real-world management becomes difficult for people who want to streamline the management of a good-looking, but even still-relatively-simple website: I say, "Well, let's see. We'll have a simple design that includes a navigation menu on the left side." That's easy enough. I create my menu and publish the module to "All". Then I say, "But, wait a minute. My home page has a special welcome message and graphics. I don't want the left-side menu on the home page, just everywhere else. How do I do that?" As has been stated by many before me, I cannot do this. I can only manually select pages on which it should be included, which means, to have a menu that shows up on every new article, that article must have a new menu link created and my menu module must then be manually assigned to show up when that link is selected. Someone must now be responsible for doing this manual task on all new published articles in order for the site to look as it ought, and in order for visitors to navigate easily. (Even in the manually-managed case, the issue remains of manually-assigned modules "disappearing" when a "Read more" link is clicked, that link not being manually assigned.)

In a scenario such as the one above, as well as more complex ones that include galleries in wrappers, download areas, etc., there are three choices that can be made:
1. Let the need of easy management dictate that any published module will appear on every page of the Joomla site. No exceptions. If there are any exceptions, a second site will have to be created and linked to from the first.
2. Manually add the links and assignments as regularly as possible, leaving gaps between publishing time and when the management catches up.
3. All publishers must be given access to the back end and taught to add links and assign them any time they publish an article.

In conclusion, I confess that, from a coding standpoint, I do not know the amount of work required to add this functionality to Joomla. But I agree with others that, from a logical, real-life user perspective, it at least seems like an obvious need for day-to-day management.

To those who develop: Thank you for all your hard work. This is my key issue, but I love the usability, flexibility, and active community around, the Joomla CMS!

User avatar
Geraint
Joomla! Guru
Joomla! Guru
Posts: 561
Joined: Fri Aug 19, 2005 5:23 pm
Location: Gogledd Cymru

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by Geraint » Tue Apr 08, 2008 8:33 am

I hadn't found this whitepaper before I coded up this functionality and posted in another forum see http://forum.joomla.org/viewtopic.php?f=231&t=282105

If we are to add this type of additional logic to the module manager then I think we should also add the mechanism to manage which modules are visible for a menu item from com_menus too!

Geraint

p.s. I think the idea of using negative numbers to represent the "except" selections is a clever idea for avoiding an extra table field but to me isn't as logical a solution as the extra table field

paulgibbs
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Mon Mar 12, 2007 8:23 pm

Re: Additional logic in Module Manager Menu Item Assignment...

Post by paulgibbs » Thu May 01, 2008 5:36 pm

C.Ludwig wrote:Hi,
But I will be very happy if the new features 'All but selected' and 'Selected with children' would come with V1.6.
Yes! "Selected with children" would save so much time and frustration with my new users, and it would be so simple. I'm very eager to see this improvement.

orware
Joomla! Explorer
Joomla! Explorer
Posts: 255
Joined: Mon Jul 10, 2006 8:16 pm
Location: CA
Contact:

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by orware » Fri May 02, 2008 9:01 pm

Going back to the post by tightchord I just wanted to also mention some functionality related to menus/modules.

I manage a community college website that uses a commercial CMS developed locally in our area.

I really would like to move to Joomla, because we cannot change the design of our very easily (that'd be from my point of view as webmaster), but on the other hand I know Joomla is not currently as simple to use as the commercial CMS is.

Currently, pages that can be edited by a user are assigned to them, so when they login all they see are the pages they are allowed to edit (plus any subpages they have created), but something that is pretty nice is that the pages automatically create the menu entries (so if you create a main page and a few subpages in the admin area, then go view the main page in the frontend, there will be menu entries for the newly created subpages).

In Joomla, I'm not really sure which way would be best to implement this (and I know this runs into the ACL topic as well) but I think it would come in very handy for each user to have their own menu module created for them and assigned to them automatically (with the additional ability to assign additional menu modules as needed). Then the trick here would be for this menu module to only show up on the pages that were created by that particular user.

There are some commercial alternatives, like UHP2 from Ravenswood, that allow multiple users to set up their own subsites within the main Joomla website, but they don't take advantage of the built-in menu system (e.g. UHP2 has it's own menu system within the Joomla mainbody area).

The problem I see with Joomla is that with a lot of users, each submitting various articles, which are in turn getting reviewed by editors and approved...there is still the need (in some cases) that each of these articles show up within the menu system, which would require someone (with higher privileges) to manually add each of the articles into the menu.

I hope this isn't too off-topic for those of you keeping track of this topic (and I throw my support around having the EXCEPT logic...I've run into the same issue numerous times on the various sites I've worked on).

I'm looking forward to being able to migrate our college to Joomla once 1.6 is available :-),

orware

MastahM
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Apr 19, 2007 7:23 am

Re: Additional logic in Module Manager Menu Item Assignment...

Post by MastahM » Mon Jun 16, 2008 11:31 am

bradnana wrote: The EXCEPT method will do everything that Whole Menu Selection will do, but Whole Menu Selection will not do everything the EXCEPT method will do. The EXCEPT method provides additional functionality when considering automatically generated page views that are not specifically associated with any Menus or Menu Items.
Really?
I don't see EXCEPT method doing everything that Whole Menu Selection would. I have two menus and would like to assign template (or module) A to all items in menu 1 and template B to all items in menu 2. Now, if I set template A as default and template B to be shown in all items except those that are currently in menu 1, I would need to set the same kind of exception every time I add a new item in menu 1. That wouldn't help a bit. But if I had the opportunity to set template B for the whole menu 2, it would make my life easier.

Or how could the EXCEPT method cover that? Didn't I just get it? :)

bradnana
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Fri Feb 15, 2008 11:19 pm

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by bradnana » Mon Jun 16, 2008 5:04 pm

@MastahM,

You're right! Although technically, I think your scenario better lends itself to ACCEPT logic rather than EXCEPT logic since you are wanting to set a single module to display only on an accepted menu item. (If I understood you correctly, you want Module A on Menu 1 only and Module B on Menu 2 only. I don't understand your reference to 'default'. Did you mean you are setting Module A to ALL?)

Nevertheless, your example proves where the Whole Menu Selection concept shines. As I have stated before, it is certainly a much needed addition. The strength of Whole Menu Selection arises when, as you determined, multiple menu exceptions (or acceptions) occur. Given only one exception, the difference in functionality between EXCEPT and Whole Menu Selection is negligible. However, when needing to EXCEPT more than one menu/module combination, Whole Menu Selection is absolutely necessary.

As more input is brought to bear on this topic, it appears that both are needed to comlete the system logic. In the end, that would give us ALL, NONE, ACCEPT, EXCEPT and Whole Menu Selection. Then, one could choose to include or exclude modules from entire menus or individual menu items by selecting ACCEPT or EXCEPT and selecting the menu title or menu item name as the case dictates.

This is why I say that your scenario better lends itself to the ACCEPT logic. With Whole Menu Selection, you would be able to configure Module A to ACCEPT (currently implemented as 'Select Menu Item(s) from the List) and then select the title of Menu 1. Likewise, for Module B, you would select ACCEPT and then select the title of Menu 2. So, you're not really using the EXCEPT logic. You would be using EXCEPT if you wanted Module A or B to show on all pages EXCEPT Menus 1 or 2. And this is the strength of the EXCEPT method.

Only the EXCEPT method can compensate on system generated pages on which modules are not displayed correctly when using the ACCEPT method.

In summary, I said:
The EXCEPT method will do everything that Whole Menu Selection will do, but Whole Menu Selection will not do everything the EXCEPT method will do.
I recant. As MastahM has shown, this is not true when dealing with more than one menu/module combination exception. However, where I said:
The EXCEPT method provides additional functionality when considering automatically generated page views that are not specifically associated with any Menus or Menu Items.
This is true. System or 'automatically' generated page views do not display modules correctly when using the ACCEPT method.

MastahM
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Apr 19, 2007 7:23 am

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by MastahM » Mon Jun 16, 2008 5:48 pm

Oh! Thank you, that was a thorough reply :)
bradnana wrote: You're right! Although technically, I think your scenario better lends itself to ACCEPT logic rather than EXCEPT logic since you are wanting to set a single module to display only on an accepted menu item. (If I understood you correctly, you want Module A on Menu 1 only and Module B on Menu 2 only. I don't understand your reference to 'default'. Did you mean you are setting Module A to ALL?)
Heh, in this case I was talking about templates, since the same EXCEPT or whole menu assignment logic should cover them also. And true, in this case there would be no reason to use EXCEPT, but I just wanted to come up with an example that would use that. Now I read it again, and the selection was a bit silly, to be honest. :p

Ztztek
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jun 19, 2008 2:14 pm

I can't wait until this is fixed!

Post by Ztztek » Thu Jun 19, 2008 2:20 pm

I would assume this would be a simple fix which just lists all the categories even the ones that are not assigned a menu item. You wouldn't need an EXCEPT option if you can see all the categories and can select them. For the articles with no categories, they should just show the "Uncategorized" option in the menu item. Also bit of a off topic but is there a way to access the "Uncategorized" articles from administration panel? I am just thinking out loud here, i have no idea if i am making an ass out of myself. :-[

User avatar
perandre
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Thu Feb 23, 2006 2:17 am
Location: Norway
Contact:

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by perandre » Mon Jun 23, 2008 10:18 am

This is a great project!

Just for the input, here's the way it's handled in Drupal 6 (Block = module, sort of):
showhidemodule.png
Most important to me is the EXCEPT function. The ability to show/hide depending on the url is a nice concept too, but not nearly as important...or easy to implement. Great job, guys!
You do not have the required permissions to view the files attached to this post.

Tigratrus
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Jan 29, 2008 3:29 am

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by Tigratrus » Thu Jul 17, 2008 3:47 pm

This issue has such a huge impact on our site development it's hard to adequately put it into words ;).

We've got a pretty complex site with multiple different page layouts, and constantly having to go back and update all the menu settings on multiple modules for things that should be displayed *some* of the time is an unbelievable PITA. We've thought about doing it via multiple templates, but we're still tweaking things too much, and having to replicate tweaks multiple times would drive us NUTS.

As we're just starting to get more into the guts of J! (been focused mainly on learning to hack/modify templates nine ways from Sunday :p ) I haven't really touched messed with the nightly builds at all... Can anyone point me in the right direction for how I would follow this change in the SVN? TortoiseSVN is my friend :: pets the helpful little turtle ::

Thx in advance for A. Bringing this issue into the light of Dev attention, B. Deciding that it's a feature for (hopefully) the 1.6 release and C. Any help you can provide!

James and Susan

User avatar
trouble
Joomla! Intern
Joomla! Intern
Posts: 92
Joined: Tue Jul 31, 2007 9:27 am
Location: UK

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by trouble » Thu Jul 17, 2008 4:30 pm

Hi James and Susan,
You can track tasks for 1.6 at http://joomlacode.org/gf/project/joomla ... er_id=6405. Not exactly what you wanted, but it might help.

I have exactly the same problem as you - a large site with a couple of different page layouts. I really need this (and another few others) feature now, so I'm also watching with anticipation.

User avatar
mannequin
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Fri Jun 27, 2008 1:01 am

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by mannequin » Thu Sep 04, 2008 2:50 am

how about WHITELIST and BLACKLIST the menu items as an option. I see it in Article Parameters. Not sure if it works the same though

Ratleto
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Wed May 03, 2006 11:13 am

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by Ratleto » Thu Sep 11, 2008 12:39 pm

This feature would help me A LOT.

I'm currently working on a Joomla-site that is basically divided into 4 seperate sites, 1 common and 3 sub-sites. Each sub-site has a different design and menus. Now I have to assign each template and each menu manually to every menu-item. This is a large job, but the real hazzle is when a category is added, and I have to add a link in a menu to this new category. Then I have to edit template-assignment and a lot of menus to get them to show up at the right place.

By being able to select a template and other stuff directly to a menu instead of the menu-items, things would be SO much easier.

Thanks to all the people working on Joomla, btw! Great work you're all doing. :)

User avatar
corrado444
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Thu Jul 06, 2006 8:30 am
Location: Sacramento
Contact:

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by corrado444 » Thu Sep 11, 2008 6:46 pm

This is a fantastic project that I have been struggling with ever since I started working with Mambo 3 years + ago. It's really nice to finally see that something is done in this regard and I can't wait to see it realized.

Where can I follow the development of this feature? Have I missed it above?
Watch the 10 Minute Joomla! Tips Video Podcast
Itunes: [url]itpc://10minutejoomlatips.blip.tv/rss/itunes[/url]
Feedburner http://feeds.feedburner.com/10MinutesJoomlaTips

ewel
Joomla! Guru
Joomla! Guru
Posts: 522
Joined: Mon Oct 01, 2007 11:35 am

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by ewel » Mon Oct 13, 2008 8:18 pm

I haven't been here for a while, and I am really pleased to see that this feature suggestion (clearly I was not the only one proposing it!) is accepted.

To help development, I am attaching a fully functional module which publishes other modules pretty much in the way proposed. I haven't published this yet in the JED but plan to do so when I have a website up, and also I am planning to add more features to it. It was far more useful and necessary in J!1.0.x than it is in J!1.5, but still it does add some functionality as discussed above.
You do not have the required permissions to view the files attached to this post.

User avatar
corrado444
Joomla! Guru
Joomla! Guru
Posts: 856
Joined: Thu Jul 06, 2006 8:30 am
Location: Sacramento
Contact:

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by corrado444 » Fri Oct 17, 2008 5:14 pm

Thank you for the module. I have just downloaded it and I'll be trying it out today.
I have to wonder how a module can fix this issue though. I would think a plugin or a core file change would be the way to go.

Naturally, I am speaking without knowing what the module is about but any move forward on this topic is welcome.
I am just now working with a site where having ths functionality would be really nice indeed.

Thank you again.
Watch the 10 Minute Joomla! Tips Video Podcast
Itunes: [url]itpc://10minutejoomlatips.blip.tv/rss/itunes[/url]
Feedburner http://feeds.feedburner.com/10MinutesJoomlaTips

ewel
Joomla! Guru
Joomla! Guru
Posts: 522
Joined: Mon Oct 01, 2007 11:35 am

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by ewel » Fri Oct 17, 2008 5:57 pm

The module fixes the issue, to an extent, because it can be used to publish other modules dependent on conditions. So, for example you can publish the module Latest News to position 'onanypage1' and then you publish the OnAnyPage module to for example position 'user1' where you wanted Latest News to appear. Then in the OnAnyPage module settings you set 'onanypage1' as the position to publish, and you can for example set that the module should only publish Latest News on the front page, or everywhere except on the front page, or if the uri contains 'com_virtuemart' or anywhere except if the uri contains 'edit', etc. I know this is not the place to discuss 3rd party extensions but please pm me any suggestions you have for improvement!

I think the functionality of this module could be built into Joomla's core, but the question is which possibilities are the most convenient and would be most wanted and used.

mrpips
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Nov 07, 2008 9:22 pm

Re: [13]Additional logic in Module Manager Menu Item Assignment

Post by mrpips » Fri Nov 07, 2008 9:45 pm

@ewel - your module is *exactly* what I've been going crazy trying to find. I need to show a certain module prominently everywhere EXCEPT the front page.

Do you have a 1.0 version available?

Thanks very much for your hard work.

--------

I went to your page and downloaded the 1.0 version.

It does EXACTLY what it's supposed to - allows me to define an "all except this and that" condition for my module. Works perfectly.

THANKS!
Last edited by mrpips on Fri Nov 07, 2008 11:08 pm, edited 1 time in total.


Locked

Return to “Accepted - Archived”