Liferay Sitemap: Filter List of Layouts by SEO Settings - liferay

As you probably know, there is a Sitemap-Portlet in Liferay that you can bring into form using a Freemarker-Template in Portlet-Configuration.
Now in a normal Liferay Page under "SEO Settings" you can decide whether to include that page into the sitemap or not.
If you don't include it, it gets removed from the actual Sitemap (/sitemap.xml) but still is shown in the portlet.
Is there a way to access these "SEO Settings" (from freemarker code) so I could somehow filter by setting?
Thanks in advance!

Nevermind, I found out when looking into liferay database table 'layout'.
There is a column for TypeSettings which sometimes contained 'sitemap-include=1', so I simply checked it using layout.getTypeSettingsProperty("sitemap-include").

Related

Kentico override robots meta tag

According to the Kentico Documentation, Kentico automatically adds the following tag when I exclude the page from search:
<meta name="robots" content="noindex,nofollow" />
But I need it to be "noindex,follow"
I've tried removing it in my canonical webpart under the OnPreRender method but Kentico is somehow adding the robots tag after that event.
I can't override it using googlebots as google will still take the more restrictive tag.
I don't mind editing the kentico code but a search of "noindex,nofollow" or "robots" in the solution doesn't find anything.
Does anyone know how I can remove or edit this tag?
I'm using K12SP Portal Engine for the record.
If you're using portal engine, on the search page go to Properties > Navigation > Search & SEO and uncheck the Exclude from search checkbox. This will manage your "noindex" value
Tho manage your "nofollow" value go to Settings > URLs & SEO and uncheck this box "Use NOFOLLOW for user links", this should get you the results you're looking for.

Is there additional configuration needed to make the breadcrumbs visible in a Spartacus site?

Is there additional configuration needed to make the breadcrumbs visible in a Spartacus-based site? There is a BreadcrumComponent instance inside the BottomHeaderSlot. If I load the page in the JSP-based site, a breadcrumb like "HOME / Warranty" is displayed for a /warranty page. But when I load the Spartacus-based site, it only shows "HOME". What am I missing? Do I need to edit the CMS controllers or map a breadcrumbBuilder to it?
I'm updating my answer as I misunderstood earlier, sorry for that.
Breadcrumbs are resolved in Spartacus by a specific PageMetaResolver. The content pages are by default resolved by the ContentPageMetaResolver, which you could extend.
The breakpoints resolved for Content pages (like the faq page in the sample data) are only contain a link to the home page. You could customise this by providing a custom implementation for the ContentPageMetaResolver.
--- former answer, no longer relevant ---
The visibility depends on the availability of the BreadcrumbComponent in the CMS structure. You can add this component in a page template or in a specific page.
You'll see this on the demo site, see https://spartacus.c39j2-walkersde1-d4-public.model-t.cc.commerce.ondemand.com/. On the home page there's no notion of the breadcrumb, while on other pages there is. In the sampledata, the BreadcrumbComponent is part of the components of the BottomHeaderSlot.
(For reference) Adding comments from "Krzysztof Platis" in Slack:
Backend breadcrumb builders are not reflected in Spartacus, but you can build the breadcrumbs logic by extending and/or providing new PageMetaResolvers. See docs https://sap.github.io/cloud-commerce-spartacus-storefront-docs/seo-capabilities/#page-meta-resolvers.
There is missing a paragraph about breadcumbs. But as an example. you can see https://github.com/SAP/cloud-commerce-spartacus-storefront/blob/develop/projects/core/src/product/services/category-page-meta.resolver.ts#L125.
See: https://spartacus-storefront.slack.com/archives/CD16V16FR/p1580380905111000
You could, for example, extend the BasePageMegaResolver class and override breadcrumb$ by replacing
this.routingPageMetaResolver?.resolveBreadcrumbs()
with
this.routingPageMetaResolver?.resolveBreadcrumbs({ includeCurrentRoute: true })
This option makes Spartacus include the current page in the Breadcrumbs array.

Kentico breakcrumb webpart not using the page alias

I have two pages sitting in a folder named "Auxiliary Nav". The pages have aliases set so 'Auxuliary-Nav' doesn't show in their URLs. I thought all was good until I looked at my breadcrumbs. Ideally, the breadcrumb shouldn't show "Auxiliary Nav".
I'm using the Breadcrumbs web part on a master page, but can't see a setting for this. I had also thought about just using the CSS list menu, but not sure if this would help me here.
Turn off "Show in navigation" for "Auxiliary Nav".

Removing the url field from orchard comments

Looking to remove the Url field on a blog in orchard.comments modal. The problem is that the URL get linked to the username and i do not want my site linking to explicit sites or other content. I have tried display:none on the css but it would not take a genius just to display:block it.
Thanks in advance.
Edit the content type and disable Allow custom patterns in the autoroute section.
Of you just dont want to display the field, download Designer Tools and use Shape Tracing to generate the view and then customize it as you need.

Additional Pages listed as Views in SharePoint 2007

The Situation:
I have customized the Bug Database template for SharePoint 2007 using SharePoint Designer. Specifically, I have edited the additional .aspx pages included with the template that are located inside the Bugs list. These are just simple edit forms and my customizations are very minor.
I have verified that the Supporting Files are correctly selected (New, Edit, Display). These forms have all been edited as well. I have the following .aspx pages (Non Views) in the Bugs List:
Activate.aspx
Close.aspx
DispForm.aspx - Supporting Display Form
EditForm.aspx - Supporting Edit Form
NewForm.aspx
ResolveForm.aspx
NewIssue.aspx - Supporting New Form
Resolve.aspx
The Problem:
On any of the views, the view dropdown contains 3 non views that correspond to the Activate, Close, and Resolve forms in addition to the actual view choices. Choosing these "views" just opens these forms.
Obviously, SharePoint is picking up any .aspx pages in the List that aren't supporting files and assuming they are views. Strangely, this was NOT the case for these files before I modified them using SharePoint Designer. Additionally, The NewForm.aspx page was NOT modified (I just created a new form that is now a supporting file), and even though it is not marked as a supporting file, it does not incorrectly show up in my views list.
The Conclusion:
There must be some setting to mark these files as non views without them being supporting files. I have looked through the NewForm.aspx and compared it to my modified forms and can find no obvious difference that should have any bearing on this.
Perhaps you have had this problem before or are aware of how to fix this issue? If so, here are some easy points! Thanks in Advance!
If they have been setup as a view (which it sounds like they have been), try making the <View> hidden to remove it from the view list
http://msdn.microsoft.com/en-us/library/ms438338.aspx
<View BaseViewID="1"
Type="HTML"
WebPartZoneID="Main"
DisplayName="Activate"
RowLimit="100"
ImageUrl="/_layouts/images/generic.png"
Hidden="TRUE"
Url="Activate.aspx">
I dont think you can make them <Form> elements, as it only accepts DisplayForm, EditForm, or NewForm
http://msdn.microsoft.com/en-us/library/ms478121%28v=office.12%29.aspx

Resources