Joomla 3.0 missing menu parameters - joomla

Has been some time till I last worked in Joomla (that was verion 1.5.x)
In Joomla 3.0 the Menu parameters seems to be missing. Adding the parameter helped identifying what menu item has been clicked. The problem I am having now is that if I use the same component for two different menu items in the main menu - it will basically do the same.
BEFORE (Example):
Menu Item (1) - Landscape pictures (Menu parameter is set to 1)
-> Calls com_picturegallery
-> See's that parameter is ONE and select statement of component filters for all landscape pictures.
Menu Item (2) - Urban pictures (Menu parameter is set to 2)
-> Calls com_picturegallery
-> See's that parameter is TWO and select statement of component filters for all urban pictures.
In Joomla 3.0 i cannot find an option to set these parameters in the menu settings for main menu.
Does anyone know how else to tell Joomla that depending on menu I click the component has to do a specific task.
Thanks!

This is how it works - I suppose it has been also best practice in Joomla 1.5.x
$menu = JSite::getMenu();
$alias = $menu->getActive()->alias;

Related

In Apex 5.1, how can I open an list item that links to a page in my application in a new window in my browser?

looking for a way in Apex 5.1 to open list items that goes to a specific page in a new window.
1 - Go to your list on Shared Components
2 - On each item of your list, fill on "User Defined Attributes" the second field (image below):
Example: https://apex.oracle.com/pls/apex/f?p=145797:5:
Test 1 open on another page
If dont work check the correct field to put your link attributes. (image below, click on it):

Replace custom menu with Oracle Forms 11g default menu

In my main form window, I have the following menu bar which is used for traversing. Its inherited from .mmb file.
Now, when I select any form on the menu, lets suppose I selected the highlighted "Purchase Order", then I don't want the same menu to be shown. I want the Oracle Form 11g's default menu to be shown instead, picture added below for reference.
I changed form's property of Inherit menu to No and the menu from image 1 isn't shown in "Purchase Order" but I still am not getting the default&smartbar menu.
How can I achieve that?
Thank you.
So I figured out a way how to disable .mmx menu and enable DEFAULT&SMARTBAR menu when I go to another form through the menu.
From the first screenshot above, the on-click-trigger had the following code
call_form(:global.path||'pc');
I replaced it with
call_form(:global.path||'pc',hide,do_replace);
So the addition of
,hide,do_replace
worked.
Side note: Also, make sure Inherit Menu property of Window property is "YES" and Menu Module of form property is set to "DEFAULT&SMARTBAR"
I think in the properties window from the form you got the property "menu module"
If you make a new form it gets the default: DEFAULT&SMARTBAR
So I think it is now filled with your mmb filename.

Style (template) assignment to menu items in Joomla 1.7 - baffled

I have a number of Template Styles. If I change the default Style, I can see that my Styles are working. The Style actually changes. But for a week I have been trying to find out why my menu assignment doesn't work. I'm completely baffled.
So I have found two possible places where I could possibly change my Style per menu item. Either in Template Manager: Edit Style -> Menus assignment -> ticking the menu item. Or Menu Manager: Edit Menu Item -> Changing Template Style. I have tried these settings a hundred times. Those settings have absolutely no effect.
Where can I change the Style so that I get different Style for each menu item (by menu item I mean the page opened by the menu item)?
Try to create separate style files like mymenu1style.php, mymenu2style.php etc. together with corresponding XML files as it is described at http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6 in Menus section of that document
Then assign each style in Menu Manager "Edit Menu Item -> Changing Template Style"
I found the answer. I didn't use the actual Joomla menus before so I didn't know what links they produce. And there was a trick in the links they produce. On Menu Manage: Edit Menu Item there is the Link for the menu item ready for copypaste. However, this link is for example:
index.php?option=com_content&view=article&id=65
and the Itemid variable is missing from that! If it's missing, the template style will be the default one instead of the assigned one! So the correct link is, for example:
index.php?option=com_content&view=article&id=65&Itemid=205 (note exact cases on Itemid) (the Itemid, aka ID, is in fact also on the same Edit Menu Item page, but just separately)
Or the other correct link is, after enabling Global Configuration / Site / SEO Settings / SEF URLs Yes:
http://site.com/index.php/menualias
That would also render with the assigned template. Or without the index.php/ part with the URL rewriting option.
So, which overrides which: the Edit Menu Item / Template Style setting or the Template Manager: Edit Style Menus assignments? The answer is, according to my test, if you keep the EMI Template Style as - Use Default -, then you can change it from Menus assignments. In other cases, the last saved situation overrides. If you have EMI Template Style set to mystyle1 and Menus assignments the same page is set to mystyle2, the latter will override while the EMI Template Style remains set to mystyle1. So it's a bit confusing. Then if for the page you change EMI Template Style to mystyle3, that will blank out the Menus assignments setting and therefore override that.

Dynamic menu table in inner pages

I want to add dynamic menu table in inner pages based upon the tabs on the home page.
how to do that in joomla,please help me.
It sounds like you are trying to create a split menu where the link you click at the top determines the menu that shows up in a column/below. This is the native behavior for Joomla menus simply by setting the start and end levels in the menu module. Here is a good tutorial -
http://www.theartofjoomla.com/magazine/article/27-more-menu-tricks-the-split-menu-technique.html
Beware:: The split level menu feature in Joomla only works when the split equals TWO levels. If you want to build your site with a single master menu that spans 3 or more levels, this does not work. It looks like the internals of Joomla do not know how to track the parent properly (not really sure) when the menus are generated (probably an overstatement). Level 1:1 works, Level 2:2 works but then when you try to specify a menu starting at level 3, it breaks. In my case, I hacked the menu to check the pathways (breadcrumbs) list and derive what I wanted from it so I could determine the real parent of the items at level 3 (or other). Then I could get the items to generate proper. This was a disappointment in Joomla (v1.7). And then on top of this, you would then have to hack further to ensure that each menu item instance starting at 1 is highlighted proper. Perhaps the menus should be more closely coupled to the breadcrumbs pathway list.

show joomla component in menu item type

I made a component for Joomla and it's working ok with the direct url: http://www.something.com/index.php?option=com_pbform
The problem is that when I try to add it in the menu.
When I change the menu item type, the component is listed, but when I click on it I don't get a view to apply to the menu item.
Do I have to configure anything else in the component?
Thank you!
Add your component to jos_components table:
INSERT INTO jos_components (name, link, admin_menu_link, `option`)
VALUES (
'Greetings', 'option=com_greetings', 'option=com_greetings', 'com_greetings')
If you have all your views set up correctly you need to add your component into the Joomla database.
Functions and view folders must have no hyphens or underscores.
Good
/view/viewone
/view/viewtwo
/view/viewthree
Bad
/view/view_one
/view/view_two
/view/view_three
If you setup your component in the MVC fashion then you would have a views/layout folder structure in your component folder. Each different view you have in there will be listed in the menu types under your component name. This is where the views can be chosen.
For e.g. in your component folder structure you have
views/view_a
views/view_b
views/view_c
then in the Joomla menu selector you would have those choices to select as a view.
If you haven't setup your component as MVC then have a look at this tutorial on how to do just that http://www.joomladevuser.com/tutorials/components
I hope that helps!
Cheers
You may need a metadata.xml file for each of your views. See http://docs.joomla.org/Adding_view_layout_configuration_parameters for more details
Use this simple solution. You expected to find your new component in the menu item type drop-down list, but its not there! Instead of trying to cope with that ugly MVC scrap do this:
select "single article" from the list and SAVE your new menu item
now open your joomla db
select _menu table
edit your menu row
change link from article to index.php?option=com_yourcomponent
save and take a look at administrator menu manager
I did migrate my Joomla 1.5 collection of Ajax/PHP scripts to Joomla 1.7.3 using this solution in just one day.
Piece of cake.

Resources