--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/TvazGSvf1r4J.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/FOFgVHliOMIJ.
Also searching through the entire menu is an O(n) operation which
means that you're loading the entire menu and taking much of that RAM
to look for something that may or may not exist. What happens if you
have 40 menus and 20k items?
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/v3eKgGE3-qEJ.
While not all menu items might not be active and could be deleted, I
think we can safely assume it has more than 200.
Again, "correct" is subjective in our routing model, the router cannot
safely guess the "correct" item ID because multiple item ID's might be
available OR it might be part of a more complicated flow (category
pages).
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/LFtO4Ped8tYJ.
This humble URL can have more than one Itemid in different parts of
the site with different assigned modules and templates. Just create
two menu items pointing to the same content. At that point a given
link, which is what is being searched for here, would have more than
one Itemid - it then becomes impossible to determine which one is the
"correct" one.
Other examples include traversing through a category blog or list view
into an article view. Our current model retains the item ID so that
the menu, template and what not remain consistent. Presuming said item
had an entry in the menu system (which it may not necessarily have,
again you can legitimately NOT have an Itemid for a given URL), it
could be linked from another part of the site with completely
different modules and may even a different template. In this
particular case would it be desirable to pick up the "correct" Itemid
and use it's params or should it continue down the pathway of the
logical requestor's Itemid that was used to get the category list?
In this way it is subjective as the "correct" Itemid is based on how
you got to where you are and potentially where you want to go. And in
some cases an Itemid might not exist at all.
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
What happens when they have two list links and are located distinctly
within the app and they click "add" in one section and then upon
saving are sent to a list page elsewhere (perhaps with no add button
in that menu). You end up with a greater problem because at this point
instead of the wrong thing being highlighted, the user is potentially
in the wrong place…but it is also the right place…triggering question
"where is the add item link?". Short of either adding another add link
or deleting that list link, those people trying to front end
administrate the site could be set up to a frustrating user experience
("why can't it just go back to where it was? why does it have to jump
around?").
As an alternative if two menu items are indeed paired, have the list
view menu item set as a param for the add item view and then just add
the Itemid based on the params for the menu item. The params are
already loaded and easily available in the component saving you a look
up of the menu tree.
Cheers,
Sam Moffatt
http://pasamio.id.au
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/dR6w5LliooAJ.
Did i miss something?
In a sense that's also a feature as well as a PITA. Really works both
ways. Though for you it works negatively.
> using the previous function you can try to "guess" the correct itemid
> sadly, we cannot use it since, sometimes, users refers the same view on
> multiple menu
Yeah, which is a flaw of our menu model that also means you can easily
created duplicate content. Of course, this is in a sense a feature as
well by being able to structure stuff in different ways and have
different keywords, pathways and entry points to the same content.
> in conclusion, i think there is no "elegant" solution: you can only save the
> menu id as param, then on your component use it to show the desired menu
That's probably the best of a series of bad options.
>
> Did i miss something?
Nope, a good succinct summary :)
Cheers,
Sam