I have seen here how to create a sub-menu from the Orchard admin. Is this possible from Orchard.exe or a recipe?
Use dots in the /MenuPosition flag.
menu create /MenuName:"Test Menu"
widget create MenuWidget /Title:"Test Menu Widget" /RenderTitle:false /Zone:"Navigation" /Position:"1" /Layer:"Default" /Identity:"TestMenuWidget" /MenuName:"Test Menu"
menuitem create /MenuPosition:1 /MenuText:Test1 /Url:'/' /MenuName:"Test Menu"
menuitem create /MenuPosition:1.1 /MenuText:Test1-1 /Url:'/' /MenuName:"Test Menu"
menuitem create /MenuPosition:1.2 /MenuText:Test1-2 /Url:'/' /MenuName:"Test Menu"
Related
I want to achieve layout simmilar to Groove application, where hamburger menu is on the left and appbar on the bottom. However, not all pages contains appbar.
I have an usercontrol called MainFrame which contains the hamburger menu and a navigation frame.
When page is loaded into the navigation frame, the AppBar overlays the HamburgerMenu. I could just offset the HamburgerMenu, but not all pages contains the AppBar, or the AppBar's height is different.
Is it possible to show the hamburger on top of appbar? Or do you have any other ideas?
Use CommandBar instead of Page.BottomAppBar. Also, it is the recommended way for UWP by Microsoft.
You should use the AppBar only when you are upgrading a Universal
Windows 8 app that uses the AppBar, and need to minimize changes. For
new apps in Windows 10, we recommend using the CommandBar control
instead.
Set the CommandBar in the content Grid of HamburgerMenu
Here is a sample code:
<controls:HamburgerMenu>
<!-- Items -->
<controls:HamburgerMenu.ItemsSource>
</controls:HamburgerMenu.ItemsSource>
<!-- Options -->
<controls:HamburgerMenu.OptionsItemsSource>
</controls:HamburgerMenu.OptionsItemsSource>
<!-- Content -->
<Grid x:Name="ContentGrid">
<Frame Name="MainFrame"/>
<CommandBar VerticalAlignment="Bottom"/>
</Grid>
</controls:HamburgerMenu>
I want to add a new button on toolbar of my newly created tab. While I am trying to add a button to my class which is bind to that tab, by default, it goes to the main toolbar at the top instead of on the tab toolbar.
Any suggestion?
By default, all actions will show up in the main toolbar. To hide them, you need to add an entry in the CallbackCommands section of the page. For example, if you look at the customers page, you will find an "Add Contact" button in the Contacts tab. This button is not visible in the main toolbar because of this line in the CallbackCommands section:
<px:PXDSCallbackCommand Name="NewContact" Visible="False" CommitChanges="true" />
Along with above code fix, need to add below under grid also
<CustomItems>
<px:PXToolBarButton Text="New Contact">
<AutoCallBack Command="NewContact" Target="ds" />
</px:PXToolBarButton>
</CustomItems>
This is SO confusing. I have an Xpage application built with the application layout control. I have 2 Title Bars which each have a navigation element in them with two views each.
I want the selected Title Bar and view to be highlighted. I understand that somehow this involves the Navigation Path and the use of the selected and/or selection properties,, but I do not understand how they work or interact.
Can these answers help you? How do you use the Selected property of the navigator?
You need to set the navigationPath property on each XPage and this must match the selection property (using regex) on the navigation control.
Updated with answer to the comment below
Here's an example XPage for the Home tab and the navigation control for Home:
<xc:layout navigationPath="/Home/XPage1">
<xp:this.facets>
<xc:layout_menu_home xp:key="facetLeft"></xc:layout_menu_home>
<xc:content_xpage1 xp:key="facetMiddle"></xc:content_xpage1>
</xp:this.facets>
</xc:layout>
The layout custom control uses the xe:applicationLayout to control the layout. In this case it has a custom property called navigationPath which is used in the example XPage above. The corresponding navigationPath property of the xe:applicationLayout must be set to this custom property:
<xe:applicationLayout id="applicationLayout">
...
<xe:this.configuration>
<xe:oneuiApplication
navigationPath="${javascript:compositeData.navigationPath}">
Here's part of xe:applicationLayout for handling the two tabs in your layout custom control:
<xe:this.titleBarTabs>
<xe:pageTreeNode page="/xpage1.xsp" label="Home" selection="/Home/.*"></xe:pageTreeNode>
<xe:pageTreeNode page="/xpage3.xsp" label="Tips" selection="/Tips/.*"></xe:pageTreeNode>
</xe:this.titleBarTabs>
Here's an example navigation control for Home:
<xe:navigator id="navigator1" >
<xe:this.treeNodes>
<xe:pageTreeNode page="/xpage1.xsp" label="XPage 1" selection="/Home/XPage1"></xe:pageTreeNode>
<xe:pageTreeNode page="/xpage2.xsp" label="XPage 2" selection="/Home/XPage2"></xe:pageTreeNode>
</xe:this.treeNodes>
</xe:navigator>
So I have items for my custom module in my left menu bar, and I know how to order them:
menuitem id="*_id" name="*" parent="*" action="*_act_id" sequence="1"
My question is if it is possible to create sub menus.
Thank you for reading my question.
With kind regards,
To create sub menu you need to define new menu item in your xml file. for example,
This is your existing menu,
<menuitem id="menu_a_id" name="Menu A" parent="Some_parent" sequence="1" />
Now you need to add a another menu item with parent, Here the parent of the sub menu will be the Menu A,
<menuitem id="menu_B_id" name="Menu B" parent="menu_a_id" action="*_act_id" sequence="1" />
It will give you the parent-child(hierarchical) kind of menu item.
Add submenu to an existing menu to other module:
<menuitem id="name_you_want_must_be_unique" name="example"
parent="name_of_module_of_parent_menu.id_parent_menu_"
action="id_action_you_defineinxml_of_your_module" sequence=""/>
I want to have my navigation menu show up both where it normally does as well as in the footer. I've tried the following:
WorkContext.Layout.Footer.Add(New.Menu(), "5");
That renders the <nav> and <ul> elements where I expect them, but there are no <li> elements for the actual menu items; it's just rendering an empty menu. Obviously I'm not doing this right. How should this be done?
Go to widgets and add menu to the footer zone too ( It is already there in the navigation zone)