Magnolia prevent creating child page with parent page template - jcr

In magnolia, My site hierarchy as follows
Page 1
Page 1.1
Page 1.1.1
Page 1.2
Page 2
Page 2.1
Page 3
etc..
But I am also able to create Page template 1.1 under Page 1.1, how can I prevent this ?
I read category and availability and all, but this is not helping?
Any help

Categories are actually the thing you're looking for:
For your setup, you could create three page templates:
MyHome of category home
MySection of category section
MyArticle of category article
Of course Page 1 should use template MyHome, Page 1.1 should use MySection and Page 1.1.1 therefore MyArticle.
Doc about categories: http://documentation.magnolia-cms.com/display/DOCS45/Template+definitions#Templatedefinitions-Categoriesandsubcategories
As far as I know, availability can only controlled globally and not for sub-trees or levels (at least in Magnolia CE).

Related

Site page title on Categories pages and Product Page

I'm working with SAP Spartacus lib, version 3.6 and I need to implement a custom page title to Category Page and Product Page.
Actually, on Category Page the title is blank and on Pdp is returning PRODUCT NAME - Website name (I believe it is the default behavior).
I have looked back on Backoffice and my category already has a Description and I need to format my Product Page title to remove the Product name.
On SAP Spartacus Docs I've found this documentation, but for me do not explain how to implement this object on module.
{
provide: PageMetaResolver,
useExisting: YourCustomPageMetaResolver,
multi: true,
}
https://sap.github.io/spartacus-docs/html-tags/#customizing-meta-tags
Anyone can help me?
Thanks for your time.

Routing to a page with sections in two slots

I have a question regarding routing.
We have a detail page that consists of two different sections.
However, these two components/sections are in different slots.
How does the routing work in such a case ?
How can we access the detail page ?
Is that even possible ?
Routing in Spartacus is not directly related to the structure of the CMS page. A url is connected to a page structure by using the following flow:
If it's a custom application route, spartacus will not touch it
if it's a product or category route, use configurable routing to match the product or category page from the cms
otherwise it's treated as a ContentPage, the CMS is queried for a matching page.label (or part of it).
if non of the above is found, the not-found content page is loaded.
The page structure which is loaded from the CMS is rendered on the page. The LayoutComponent is used to render the template, the PageComponent is used to render the page slots and the ComponentWrapperDirective is used to map the cms components to JS components.
If you have 2 different "sections", I assume you're talking about slots. In order to render the slots, you need to configure the Layout Configuration, see https://sap.github.io/cloud-commerce-spartacus-storefront-docs/page-layout/. Since the CMS doesn't provide any info on the order an location of slots, this additional configuration is required.
There's much more to it, but I hope this gives you a start at least.

Sitefinity Custom Backend Pages MVC

I know how to create a backend page through the UI (../Sitefinity/Administration/BackendPages/Pages). Is there a way to add one through the project in VS so that I can create a custom MVC Admin Page with control over the controller and styled similar to the rest of the backend?
I would like to add a new section at the top in the backend similar to Dashboard, Pages, Content, Design or Administration which links to one custom MVC page.
Best is to create the page through the Sitefinity UI and then just add your MVC widget to the page. Page will look exactly as the other backend pages and you will have control over your widget.
Normally you would create a Group page at top level, e.g. Custom Stuff and then a standard page underneath.
Found a good solution to this in combination with Veselin's answer above. Once a page is created through the Sitefinity backend at ../Sitefinity/Administration/BackendPages/Pages you can add custom MVC widgets. In order to restrict widgets to only appear for the admin pages you can register them to the section 'Dashboard' that is only available for backend pages:
[ControllerToolboxItem(Name = "CustomAdminWidget", Title = "Custom Admin Widget", SectionName = "Dashboard", CssClass = "sfMvcIcn")]

Lazy load pages in PrestaShop?

By default, pagination in PrestaShop is available in every product page (displaying up to 10 items per page).
But according to my project requirements, I need a lazy loading page (only 10 products need to displayed before trying to scroll down the page). Does PrestaShop have this feature ?
This is not possible by default.
You have to create your own module or buy/use available product like:
Masonry All Products
Infinite Scroll for Prestashop
3. Answer by thepsyntist from https://www.prestashop.com/forums/
[...] I successfully implemented an infinite scroll module on
Prestashop 1.6.0.11 (A custom theme) and 1.6.1.0 (Default theme). I
found this module on GitHub a couple of months ago and finally today I
got success implementing it. Hence I have no direct link for it or
know who created it. Link to the module.
If you'd like to load images the same way, there is one another module.

dojo lazytreegrid is displayed differently in websphere portal 8

websphere portal 8 comes with default dojo 1.7.2, and this dojo documentation for lazytreegrid if for dojo 1.7 http://dojotoolkit.org/reference-guide/1.7/dojox/grid/LazyTreeGrid.html
But when I run the example in the documentation, the treegrid is displayed like in image1. But when I use the same example, the treegrid is displayed in portal 8 differently(image2), which is quite ugly, how to get the same look and feel as in documentation
The example on the Dojo site is using "Claro" and your Portal site is using a different theme (I'm not sure which one, I think Soria).
The different themes can be loaded as modules in the Portal theme (not to be confused with the Dojo/Dijit theme).
Here's the wiki page:
http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=IBM+WebSphere+Portal+8+Product+Documentation#action=openDocument&res_title=Dojo_and_WebSphere_Portal_wp8&content=pdcontent
Look at this paragraph:
The tundra class is set on the body element in the portal Web 2.0 themes, and its corresponding CSS files are linked in as well. To use a different theme within a particular portlet, do not change the CSS classes of the body element from within the portlet because it has consequences on all other portlets and theme components that use Dijits on the page. Instead, use a separate node within the portlet to contain all the widgets used by that portlet, and assign the different theme class name on the container node inside the portlet.