typo3 Bootstrap Package Subnavigation Left - typo3-9.x

I create a site based on Typo3 9.5.12 / Bootstrap Package 11.0.2.
The page tree looks like
Root > Sub1 > Sub1Sub1
Root > Sub1 > Sub1Sub2
Root > Sub1 > Sub1Sub3
Root > Sub2
Root > Sub3
I want to create a subnavigation menu for Sub1 so I create a page Root > Sub1 > Nav and I select Subnavigation Left.
I expected the navigation menu on this page to display Sub1Sub1, Sub1Sub2 and Sub1Sub3.
Instead, it displays the whole page tree.
I tried this in the official introduction package and the Subnavigation Left page display the list of pages of the current level in most cases.
How does Subnavigation Left (and Subnavigation Right, for that matter) decide the entry point of the menu? Can this be configured?

you could use another menuprocessor to define your additional menu in typoscript:
page {
10 = FLUIDTEMPLATE
10 {
:
dataProcessing {
:
50 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
50 {
levels = 2
entryLevel = 2
expandAll = 1
includeSpacer = 1
as = menuLevel3
}
}
}
}
This creates a menu structure for level 3 and level 4 pages you can use in your FLUID templates.
Make the configuration as you need it.
levels = how many levels should there in the menu data
entryLevel = starting level, as the first two levels are included in your main menu you can start at level 2
expandAll = include all sublevels (1) or just the active page tree (0), only important with further page levels
includeSpacer = whether spacer pages are included in the data
as = the name of your FLUID variable

Related

How to enable backend layout selection for users

I create a site based on Typo3 9.5.12 / Bootstrap Package 11.0.2.
I need to enable my editors to select a backend layout for new pages (!).
So far I did not find a way to do so. Setting Page TSConfig for the editors group like so gives me the following result:
page.TCEFORM {
pages {
abstract.disabled = 1
backend_layout.disabled = 0
backend_layout_next_level.disabled = 0
}
}
Abstract field is disabled as expected.
Backend Layout cannot be selected. What can I do?
Have you granted access to these fields in the BE-Group definition?

Hawaii template Categories Sidebar Menu

Is there a way to have the categories sidebar menu start in the expanded state? Currently it starts out collapsed and requires the user to expand the top level categories to view the ones underneath.
My store has only one main category right now and I would like to have it expanded unless the user chooses to collapse it
here is a link to the demo page as my site has not been published yet.
http://hawaii-demo.mybigcommerce.com/
[
Since the category list is controlled by a snippet, you would need to use javascript to autoselect/autoexpand that particular parent category.
Something like:
$(document).ready(function(){
if ($('li:contains(parentCategoryName)').hasClass('expandable') {
$(this).addClass('collapsable');
$(this).removeClass('expandable');
}
else {
return null;
}
});
I haven't tested the above script, but that would be one of my first tries. It may require tweaks. You should replace "parentCategoryName" with the name of your parent category that you want to expand.

How to deduce the viewPath for getSelectedModel

From an action in a view that is made of multiple borders, splits, and so on, I would like to reach data that are situated in different tables of the view.
To do that, I try to deduce the viewPath parameter for the getSelectedModel, getModel methods.
What is the structure of the view, how to navigate between the different tables and deduce the viewPath in order to call the getSelectedModel / getModel... ?
The view path is an array of indexes that allows to navigate from a view to another one in the containment hierarchy. It is used in several methods of the AbstractActionContextAware class that is extended by all actions, but that you can also extend from any application class that would need utility methods to explore the action context.
The rationale behind this view path is to start from the view from which the action was triggered and to follow the view path to reach the target view and, for instance, get its selected index.
The navigation rules are the following :
a negative step index (-n) in the path means navigate up to the n'th parent
a positive step index (+n) in the path means navigate down to the n'th child
The index of the child view when a positive step is found depends on the type of container you're on. Here are the rules :
children indexes are zero-based.
the children of a border container are indexed following this fixed order : north, west, center, east, south. I one child is missing then it is not taken into account, e.g. in a border with only a north and center children views, the center child will have index 1.
the children of a grid container (either even or constrained), tab container are indexed following their order of declaration.
the children of a split container are indexed from top to bottom or left to right depending of its orientation.
For instance, given the following UI :
split_horizontal {
left {
tabs {
form
table('A')
}
}
right {
border {
top {
form
}
center {
table('B')
}
}
}
}
the view path from table `A` to table `B` will be :
[-1, -1, 1, 1]

Sharepoint 2010 GlobalNavigationNodes

Good day, I am looking for solution to make custom top navigation menu.
I got site collection and 3-4 nested sites. Builtin top navigation menu shows link like this:
| SiteCollectionLink | NestedSite1 | NestedSite2 | etc.
when i use:
myWeb = SPContext.Current.Web.Site.RootWeb;
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(myWeb);
SPNavigationNodeCollection nodeColl = publishingWeb.Navigation.GlobalNavigationNodes;
foreach (SPNavigationNode node in nodeColl)
{
//node processing
}
i got only NestedSite1 and NestedSite2 as nodes with no main node as it's not in there.
So i wonder how can i take first node?
(builtin navigation menu sohws it as well)
Found out myself, if anyone futher will face it, try this:
SPContext.Current.Site.RootWeb

SharePoint 2010: Quick Launch Navigation Levels

Can someone tell me how to configure the OOTB AspMenu control to achieve the following:
The quick launch should only show 1 level of static items
Except for headings, these are meaningless on their own so the pages/links beneath them should also be displayed
The menu should not display an dynamic flyouts
Essentially, the navigation menu should appear as follows (assume that the subsites both have child sites and/or pages but which should be hidden):
Starting Node
- Subsite1
- Subsite2
- Page1
- Heading
- Page2
- Page3
I couldn't find a way to achieve this functionality using the properties of the AspMenu control, so instead I just explicitly removed and subsite's child items in the MenuItemDataBoundEvent as follows:
protected void CurrentNavigationMenu_MenuItemDataBound(object sender, MenuEventArgs e)
{
// Hide the contents of subsites (only level-1 links beneath headings are displayed).
if (e.Item.Parent != null && e.Item.Parent.Selectable)
e.Item.Parent.ChildItems.Remove(e.Item);
}