We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Sophist-UK
  2. General Discussion
  3. Thursday, 25 July 2013
  4.  Subscribe via email
Megamenu is only displaying Public, Registered and Special as access levels and I have traced this to method access() in megamenu.php line 242 which explicitly limits it to these access levels.

I have now coded a solution to this issue and create Pull Request 128 for merging.

Please let me know if it needs any further work.

S
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Sophist-UK,

Thank for interesting in the framework.
T3 provide only 3 popular ACL as it have meaning and use by Joomla default.

The problem is, when a user visit your site, it is hard to choose which is the best fit configuration of Megamenu to use.
Compare between ACL values is a headache.

Example:
You have 3 Megamenu configurations (Public, Register, MyCustomer)
When a user visit your site and have both Register and MyCustomer view permission. It is hard to choose which configuration to display.

It will be helpful if you can provide a good solution for this.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
I tried to look at basing the dropdown on usergroups. The issue is that menu visibility is defined by Joomla ViewLevel and ViewLevel is determined by user group membership. And the user group membership is hierarchical and inheriting.

So as you say, it would be better for T3 to display the user groups in dropdown in the megamenu configuration (instead of the view levels) and then to map the user groups to view levels in order to decide which menu items to display in the megamenu configuration.

This is technically not difficult - you populate the dropdown with usergroups. When the user selects a specific user group, you make an ajax call with that usergroup id, and the ajax call then:

1. expands the single user group to the hierarchy starting at the selected node

SELECT ug2.id AS id FROM #__usergroups AS ug1 JOIN #__usergroups AS ug2 ON ug1.lft <= ug2.lft AND ug1.rgt >= ug2.rgt WHERE ug1.id = {user selected usergroup id}

2. selects the view levels which include these ug2.id in the rules string. Unfortunately, the rules are held as a CSV string bounded by [] rather than multiple rows with each rule in a field which would allow an SQL join <sigh>. So you probably have to read the viewlevels table int memory, invert the matrix so instead of an array[viewlevel][usergroup] you have array[usergroup][viewlevel] and then array_merge the rows which are returned as ug2.id.

But the code for this should not be difficult to write - just more difficult to do than I had time for.

P.S. I disagree with your statement "T3 provide only 3 popular ACL as it have meaning and use by Joomla default." This is the situation as it was in Joomla 1.5 some years ago - anyone who wants to use the T3 framework is likely to be a more sophisticated user than a basic J3 user and so much more likely to use enhanced viewlevels. (And in Joomla3 there are more than 3 levels provided as standard anyway.) As I showed, it is not at all difficult to extend the framework to cover other viewlevels - and it is not difficult to extend it a little further to show it by usergroup membership.

This will make a big difference to the usability of megamenu if you could implement it.

S
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Sophist-UK,

I do not think it is easy.
Though Usergroup is hierarchical, it still not able to compare value between two branches.

Joomla Menu item is determined by ACL.
When a User visit a site, they come with multiple ACLs. Joomla check if the menu item ACL is included in user's ACL list, then it will be show.

We can provide the "multiple" dropdown list when configuration for Megamenu. But again the same problem raise. We can not compare the ACL values.
Megamenu has multiple configurations. If you have enough ACL, it will choose the best fit one. But if you do not have enough ACL, it will fallback to lower configuration.

We have implement the multiple dropdown but we think it is too complicated for UX.

If you have time, please create a pull-request. We are happy to included you in the contributors.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
I explained in my previous post exactly how to convert a usergroup selection in a dropdown into a set of accesslevels that that usergroup maps to.

So I am not sure why you need to compare ACL values - in the Megamenu configuration in back-end, you cannot predict which combination of user groups a particular user will be in - so the closest you can get is to display a dropdown list of usergroups and select one of these to see what menus a user who is only in that usergroup will get to see.

Whilst not perfect, it is still a great deal better than either:

1. Restricting megamenu to Public, Registered and Special access levels; or

2. Allowing all Access Levels (as per my fix) but not doing the mapping from usergroups to access levels.

So, as an interim I suggest that you merge the PR I have already provided, and when I have time I will code the full fix as described above.

S
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Sophist-UK,

We want to compare the ACL value because we want a fallback for megamenu.

For example:
We assume, Special > Register > Public.

And we have megamenu configuration for Register and Public.

When a user has Special ACL visit the website, we should chose Register configuration instead of Public configuration.

We will continue discuss when you complete your code.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
But this is just plain stupid and forces the user to use Joomla 3 as if it were Joomla 1.5 where you only had these three security levels.

You cannot just assume Special > Register > Public. If I have menus which are shown based on another access level, they will just not show up. You have at least to show all access levels even if it is confusing (as per my current fix).

When you have merged my current fixes and when I have time, I will try to code the fix to display the usergroups instead. (At present, I am wondering whether T3 is really open source as you do not seem open to the thoughts, proposals and code fixes from others.)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
:) We agree that our current solution is not a best solution. T3 is open, but we need to choose what is the best for most users.
We will of course merge your pull request if it is a stable solution.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
Yes - I fully understand. Of course you are the guardians of both code quality (we can't have poor quality code being merged) and overall design (we can't have uncontrolled feature growth either).

S
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 8
Accepted Answer Pending Moderation
0
Votes
Undo
I note that 4 weeks later and this fix has still not been merged - nor has anyone from joomlart even commented on it.

Having put the effort into identifying the issue, tracking down the cause and creating a fix, it would be nice if someone from joomlart had the courtesy at least to review and comment on it.

S
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 9
Accepted Answer Pending Moderation
0
Votes
Undo
Still no action on this?
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 10
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,
Any progress on that issue.
Many posts have been made about other ACL groups to be listed in the megamenu configuration screen.
I also assume that several users don't post anymore request to Joomlart about it as it is indicated by them that it is a T3 framework issue and that they cannot do anything about it. and On T3's side it appears to be that it is too complex for the small number of users.
This issue is really blocking for easy and nice layout of menus.
If it becomes too complex / too bad UX feeling, then users will change for another framework and other template providers.
Thanks in advance to progress on that issue and to provide clear timeline.
yves
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 11
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.