Hi, Does anyone knows how to create the automatic sitemap in liferay - liferay-6

I have created the sitemp.xml manually.But now I want to create the automatic sitemap in liferay.
Does anyone knows how to create the automatic sitemap in liferay?

You should
Go to content -> configuration -> Application Display Templates
Write template either in velocity or freemarker
Use site map portlet on your custom page and configure it, using your created custom template.
Here is example of mine:
<div>
<h1>Map service</h1>
<#assign firstLevelCounter=0>
<#list entries as secondLvlLayout>
<#if !secondLvlLayout.isHidden()>
<#if (firstLevelCounter+1)%2==0>
<div>
</#if>
<div>
<div><h2>${secondLvlLayout.getName(locale)}</h2></div>
<#list secondLvlLayout.getChildren() as thirdLvlLayout>
<div>
<div>
<h3>${thirdLvlLayout.getName(locale)}</h3>
</div>
<#if thirdLvlLayout.getChildren()?has_content>
<ul>
<#list thirdLvlLayout.getChildren() as forthLvlLayout>
<li>
<div><span>${forthLvlLayout.getName(locale)}</span></div>
</li>
</#list>
</ul>
</#if>
</div>
</#list>
</div>
<#if (firstLevelCounter+1)%2==0>
</div><hr/>
</#if>
<#assign firstLevelCounter=firstLevelCounter+1>
</#if>
</#list>
</div>

Related

remove tag and add additional css class to data-sly-resource

Here's my code and I want to add another css class toggleable-content to the existing code:
<sly data-sly-resource="${'item' # resourceType='components/header'}"></sly>
This code would look something like this:
<section aria-label="aria label">
<ul class="row">
<li class="col">
<div class="body px-3">
<h2 class="h3">
body
</h2>
<p>body text</p>
</div>
</li>
</ul>
</section>
I want to remove section tag and add another css class toggleable-content to the <ul> tag. Below is what I'd like to achieve:
<ul class="row toggleable-content">
<li class="col">
<div class="body px-3">
<h2 class="h3">
body
</h2>
<p>body text</p>
</div>
</li>
</ul>
I was wondering how to use slightly to achieve the above? I tried something below but it doesn't work:
<sly data-sly-resource="${'item' # resourceType='components/header', cssClassName='toggleable-content'}"></sly>
Assuming the section markup is managed by the included resource (components/header) then you cannot do it directly. Indirectly, with AEM, you can pass a parameter (through request attributes) and retrieve it in the components/header model, then add the section conditionally (using data-sly-unwrap for example).
Or you re-organize your code and switch from resource inclusion to template calling and pass the parameter directly using data-sly-call.

Remove ce-wrappers of fluid cObject

I masked(mask-extension) a couple of plug-ins. When the image is generated in the template, it is always wrapped in following divs:
<div id="c63" class="frame frame-default frame-type-image frame-layout-0">
<div class="ce-image ce-center ce-above">
<div class="ce-gallery" data-ce-columns="1" data-ce-images="1">
<div class="ce-outer">
<div class="ce-inner">
<div class="ce-row">
<div class="ce-column">
<figure class="image"><img class="image-embed-item"
src="fileadmin/user_upload/bla" width="975"
height="678" alt=""></figure>
</div>
</div>
</div>
</div>
</div>
</div>
Is there any way to remove all those wrappers? I simply want to have the image.
Sidenotes:
1. f:image does not work, I cannot access the proper uid for it to show. (This is perhaps an issue with mask)
2. I cannot find the tt_content.stdWrap.innerWrap > in my typoScript, as I do not know where mask puts it. It is neither in the netup.ts nor in the NewContentElementWizard.ts
You need to overwrite the fluid_styled_content partial in Resources/Private/Partials/Media/Gallery.html.
How to overwrite, you can read here: https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/8.7/Configuration/OverridingFluidTemplates/

Indexed Search extbase htmltags in output

I am using TYPO3 7.6.11 and indexed_search 7.6.0.
I use the extbase plugin for indexed_search and in the output it escapes the HTML-Tags to mark the searchword. For example, when I search for "search" I get this output:
Test text with<strong class="tx-indexedsearch-redMarkup">search</strong> pattern.
I found this bugfix to this problem: https://forge.typo3.org/issues/77901
But the file PageBrowsingResultsViewHelper.php doesn't look exactly the same, and even when I add the variable protected $escapeOutput = false; it doesn't change anything.
Any idea where this is come from and where I can disable the escaping?
It was another extension who overwrote a Partial of tx_indexedsearch that caused the problem.. -> Always check if the template you are working on is the one that gets outputted ;)
This happen because of format object rendering.your result will render in {row.description} object and initially there is no format set. you have to format your result({row.description}) to the HTML. For that:
Go to the search result file.
yourindexsearch/templatingpath/IndexedSearch/Partials/Searchresult.html
Here is the complete file:
<div class="fourffCom col-sm-6">
<f:format.html><h2>{row.title}</h2></f:format.html>
<f:if condition="{row.headerOnly} == 0">
<!-- Format html -->
<f:format.html>{row.description}</f:format.html>
<ul>
<li>
<p><f:translate key="result.size" /> </p>
<b>{row.size}</b>
</li>
<li>
<p class="tx-indexedsearch-text-item-crdate"><f:translate key="result.created" /> </p>
<b class="tx-indexedsearch-text-item-crdate"><f:format.date>#{row.created}</f:format.date></b>
</li>
<li>
<p class="tx-indexedsearch-text-item-mtime"><f:translate key="result.modified" /> </p>
<b class="tx-indexedsearch-text-item-mtime"><f:format.date>#{row.modified}</f:format.date></b>
</li>
<li>
</li>
<li>
<p><f:translate key="result.path" /> </p>
<b><f:format.html>{row.path}</f:format.html></b>
</li>
</ul>
</f:if>
<f:if condition="{row.headerOnly} == 1">
<!-- Format html -->
<f:format.html>{row.description}</f:format.html>
</f:if>
<f:if condition="{row.subresults}">
<p class="tx-indexedsearch-list">
<f:for each="{row.subresults.items}" as="subrow">
<f:render partial="Searchresult" arguments="{row: subrow}" />
</f:for>
</p>
</f:if>
</div>

Extending Liferay 7 default theme

I am looking to change just a few attributes for the default Liferay 7 theme:
Left Justify the navbar
Hide the Search control in the navbar
Allow a second level to each menu
It seems this is best done using a Themelet? Curious if someone could point me to an existing implementation I could use as a starting point for such a customization.
Thanks,
Randy
To allow a seconde level or ( Child of Child) you should add another loop inside each element. Here is the FreeMarker code to put into navigation.ftl, and you can add you CSS on it.
<nav id="navigation" role="navigation">
<div class="row">
<div class="col-md-9">
<ul class="nav1">
<#list nav_items as nav_item>
<li>${nav_item.getName()}
<#if nav_item.hasChildren()>
<div class="fulldrop">
<#list nav_item.getChildren() as nav_child>
<div class="col-xs-4">
<#assign navchild_name = nav_child.getName() />
<h3>${nav_child.getName()}</h3>
<br>
<#if nav_child.hasChildren()>
<ul>
<#list nav_child.getChildren() as nav_child>
<li>${nav_child.getName()}</li>
</#list>
</ul>
</#if>
</div>
</#list>
</div>
</#if>
</li>
</#list>
</ul>
</div>
</div>
</nav>

FluidTYPO3: How do I render content from other extensions (news...)?

Actually I found the answer already on this site
Preferred way to add an extensions into Fluid Powered TYPO3 template
but I don't get it to work :-(
I have a page template with main content and in the sidebar content from FlexSlider extension and at the bottom I want to render the list view of extension news. So I guess answer 1a from Claus will fit:
1a) create the element in a sys folder and reference it from your Flux form settings then use v:content.render to render it by UID.
but how is that done? How do I reference it from my Flux form?
Has somebody an example code. I couldn't find a tutorial or a documentation...
Thanks for reading and hopefully you have an answer ;-)
Jürgen
An easy way is to create a typoscript element and then render it in fluid:
lib.rightcolumn = CONTENT
lib.rightcolumn {
table = tt_content
select {
pidInList = 42
where = colPos=1
}
}
<f:cObject typoscriptObjectPath="lib.rightcolumn" />
Another way is to directly create it in fluid:
https://fluidtypo3.org/viewhelpers/vhs/master/Content/RenderViewHelper.html
Finally I got it accidentally by fixing another problem:
Fluid Powered TYPO3 FLUX Fluidcontent - No Output in Frontend?
I had to add the file "typo3conf/AdditionalConfiguration.php" with
<?php $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'] = array('fluidcontentcore/Configuration/TypoScript/');
Thanks for help nBar, I used "f.cObject" as workaround.
Now here is my Page/Template code:
<f:section name="Configuration">
<flux:form id="homepage">
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="0" colspan="2" name="main" label="Main content"/>
<flux:grid.column colPos="1" colspan="1" name="logoslider" label="Logo slider"/>
</flux:grid.row>
<flux:grid.row>
<flux:grid.column colPos="2" colspan="3" name="news" label="News"/>
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Main">
<div class="container">
<div class="row">
<div class="col-md-8">
<v:content.render column="0"/>
</div>
<div class="col-md-4 team_logos">
<div class="infobox">
<v:content.render column="1"/>
</div>
</div>
</div>
<div class="row infobox">
<div class="col-md-12">
<v:content.render column="2"/>
</div>
</div>
</div>
</f:section>