sitemap for multilingual page - typo3

I try to create a sitemap for a typo3 installation with multible languages. I tried like 10 extensions and noone of them seems to fit. Some of them create the sitemap just for the default language. Some of them create links for all languages, but they also create links to pages that are not translated at all.
Idealy I would like to output a sitemap like this: https://support.google.com/webmasters/answer/2620865?hl=en
And only add links to other languages if that page exists in that language. Also we do not use the default language at all. So I just want the localized links in it.
I also tried to create something with fluid and then output it as XML, without good success.
Any idea how to archive that?
Edit (this edit belongs to the answer of Jozef Spisiak and his changes to seo_basics)
The changed seo_basics from Jozef Spisiak output following code:
Config:
tx_seo_xmlsitemaps.10.sysLanguageHrefLangMappings {
# sys_language_uid = hreflang
1 = de-ch
4 = de-at
12 = de
}
Output:
<url>
<loc>http://domain.com/</loc>
<lastmod>2016-10-13T17:53:56+02:00</lastmod>
</url>
<url>
<loc>http://domain.com/home/</loc>
<lastmod>2016-06-27T15:25:24+02:00</lastmod>
<xhtml:link rel="alternate" hreflang="" href="http://domain.com/home/" />
<xhtml:link rel="alternate" hreflang="de-ch" href="http://domain.com/ch/home/" />
<xhtml:link rel="alternate" hreflang="de-at" href="http://domain.com/at/home/" />
<xhtml:link rel="alternate" hreflang="de" href="http://domain.com/de/home/" />
</url>
<url>
<loc>http://domain.com/ch/home/</loc>
<lastmod>2016-06-27T15:25:24+02:00</lastmod>
<xhtml:link rel="alternate" hreflang="" href="http://domain.com/home/" />
<xhtml:link rel="alternate" hreflang="de-ch" href="http://domain.com/ch/home/" />
<xhtml:link rel="alternate" hreflang="de-at" href="http://domain.com/at/home/" />
<xhtml:link rel="alternate" hreflang="de" href="http://domain.com/de/home/" />
</url>
<url>
<loc>http://domain.com/at/home/</loc>
<lastmod>2016-06-27T15:25:24+02:00</lastmod>
<xhtml:link rel="alternate" hreflang="" href="http://domain.com/home/" />
<xhtml:link rel="alternate" hreflang="de-ch" href="http://domain.com/ch/home/" />
<xhtml:link rel="alternate" hreflang="de-at" href="http://domain.com/at/home/" />
<xhtml:link rel="alternate" hreflang="de" href="http://domain.com/de/home/" />
</url>
<url>
<loc>http://domain.com/de/home/</loc>
<lastmod>2016-06-27T15:25:24+02:00</lastmod>
<xhtml:link rel="alternate" hreflang="" href="http://domain.com/home/" />
<xhtml:link rel="alternate" hreflang="de-ch" href="http://domain.com/ch/home/" />
<xhtml:link rel="alternate" hreflang="de-at" href="http://domain.com/at/home/" />
<xhtml:link rel="alternate" hreflang="de" href="http://domain.com/de/home/" />
</url>

We are using seo_basics and created this feature together with typoscript configuration on which languages to show in sitemap. You can check the code here: https://github.com/pixelant/t3ext-seo_basics/
For configuration, check commented out section of typoscript setup. We also created pull request, but it is still waiting for feedback:
https://github.com/b13/t3ext-seo_basics/pull/30

Related

How to send Cutomised output through RUNDECK

I have set my rundeck-config.groovy in my config folder and this is included in my profile file as well.
My Groovy file:
grails.mail.default.from="pavan#gmail.com" grails { mail {host = "smtp.gmail.com" username = "pavan#gmail.com" port = 587 password = "ghsdkexgbnsowmdsu" props =["mail.smtp.starttls.enable":"true", "mail.smtp.port":587, "mail.smtp.auth":"true"] }}
when i run my RUNDECK job i am recieving email notification, but the email i recieve has all the details, logs, commands used, even code which i dont want the recipent to see
i want to customise it and show only the output result in message body.
example: Checking Health of a server
url = "curl -kv https://vn2-lpgdmt-capp99.rno.vzon.com:8990/health/check"
in the output i only want to show as
https://vn2-lpgdmt-capp99.rno.vzon.com:8990/health/check = Status:200 ok
kindly help, what plugins i might have to add or anything
thank you in advance
You can use a custom template with your email notification that prints the output using ${logouput.data} to print the output, I leave an example:
<joblist>
<job>
<context>
<options preserveOrder='true'>
<option name='myurl' value='http://www.google.com' />
</options>
</context>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>322beb61-c701-4758-b58f-55da63953dee</id>
<loglevel>INFO</loglevel>
<name>CheckStatusExample</name>
<nodeFilterEditable>false</nodeFilterEditable>
<notification>
<onsuccess>
<email attachLog='true' attachLogInline='true' recipients='devopsteam#example.net' subject='Success!' />
</onsuccess>
</notification>
<notifyAvgDurationThreshold />
<plugins />
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<fileExtension>.sh</fileExtension>
<script><![CDATA[echo "#option.myurl#=$(curl --write-out %{http_code} --silent --output /dev/null #option.myurl#)"]]></script>
<scriptargs />
<scriptinterpreter>/bin/bash</scriptinterpreter>
</command>
</sequence>
<uuid>322beb61-c701-4758-b58f-55da63953dee</uuid>
</job>
</joblist>
With this HTML template:
<html>
<head>
<title>my template</title>
</head>
<body>
<p>Data: ${logoutput.data}</p>
</body>
</html>
Here the result on Rundeck, and here on the email inbox.
Is it possible to pass a captured Global Log Filters variable like ${data.app_host} into a mail template like this?
<html>
<head>
<title>my template</title>
</head>
<body>
<p>Data: ${data.app_host}</p>
</body>
</html>

What's wrong with my trace compass analysis?

I've generated an event stream with an lttng-ust, using the header file, contatining the following event declaration:
TRACEPOINT_EVENT(
random_chart,
point,
TP_ARGS(
int, value_arg
),
TP_FIELDS(
ctf_integer( int, value, value_arg )
))
After successfully opening it in a TraceCompass, I've tried to write an analysis with an XYChart, showing this value stream as a simple plot. My XML file contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<!-- The state provider assigns states from events -->
<stateProvider id="org.eclipse.linuxtools.ust.random_chart" version="1">
<head>
<traceType id="org.eclipse.linuxtools.lttng2.ust.tracetype" />
<label value="Value chart analysis" />
</head>
<!-- Event handlers -->
<eventHandler eventName="random_chart:point">
<stateChange>
<stateAttribute type="constant" value="Dummy" />
<stateAttribute type="constant" value="Value" />
<stateValue type="eventField" value="value" />
</stateChange>
</eventHandler>
</stateProvider>
<!-- This is the definition of the XY chart view -->
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
</head>
<entry path="Dummy/Value">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>
I can't see what's wrong with it (even after reading all the related xml-schema files in a git-repository).
I can import this successfully, but after clicking on an 'XML XY Chart View' I see an empty plot and a single (last in the event stream) value under the 'type filter text'.
AFAIK the 'State System Explorer' shows me correct 'Value at timestamp' corresponding to the 'Full attribute path' equal to 'Dummy/Value'. Probably I miss something.
EDIT1: I've tried to fix, but still have no luck:
<entry path="Dummy"> <display type="constant" value="Value" /> <name type="self" /> </entry>
EDIT2: Same problem with:
<entry path="Dummy/Value">
<display type="self" />
<name type="self" />
</entry>
You have 2 possibilities to fix the problem, given that you have only one attribute with data:
1- Change the <entry path="Dummy/Value"> to <entry path="Dummy"> and keep the rest
or
2- Keep your entry and change the display element to <display type="self" />
A display of type constant means it tries to read an attribute of that name under the main path, so here, it was trying to read "Dummy/Value/Value", which doesn't exist
EDIT: Here's a working example of the view part for your analysis:
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
<label value="Random view" />
</head>
<entry path="Dummy">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>

flux:form.section inside another flux:form.section not rendering flux:form.object Properly

I am creating a Layerslider with Fluid Content Element (FCE).
Below Is my code.
<flux:form.sheet name="elements" label="Elements">
<flux:form.section name="slides" label="Slides">
<flux:form.object name="slide" label="Slide">
<flux:field.input name="title" label="Slide Title" />
<flux:field.text name="layersliderdata" enableRichText="0" rows="4" label="Layerslider data" />
<flux:field.file name="background" allowed="jpg,png,jpeg,gif" label="Background" />
<flux:field.file name="thumbnail" allowed="jpg,png,jpeg,gif" label="Thumbnail" />
<flux:form.section name="elements" label="Elements">
<flux:form.object name="text" label="Text">
<flux:field.text name="content" rows="3" label="Text" />
<flux:field.select name="type" items="p,h1,h2,h3,h4,h5,h6,h7,h8" label="Type" />
<f:render section="SharedObjectFields" arguments="{_all}" />
</flux:form.object>
<flux:form.object name="image" label="Image">
<flux:field.file name="file" allowed="jpg,png,jpeg,gif" label="Image file" />
<f:render section="SharedObjectFields" arguments="{_all}" />
</flux:form.object>
</flux:form.section>
</flux:form.object>
</flux:form.section>
</flux:form.sheet>
<f:section name="SharedObjectFields">
<flux:field.text name="style" enableRichText="0" rows="4" label="CSS Styles" />
<flux:field.text name="layersliderdata" enableRichText="0" rows="4" label="Layerslider data" />
<flux:field.input name="class" label="Class" />
</f:section>
I am Getting Result Like this.
But I want Result as per below screenshot.
I Dont Know. What's going wrong.
I am using below Versions of fluid elements.
Typo3 6.2.14
vhs 2.3.3
fluidcontent 4.2.4
fluidpages 3.2.3
flux 7.2.1
I can confirm this on dcngmbh/moox_core for Split Button with DropDown FCE (Fluid Content Element) in which its display result in backend like this.
http://screencast.com/t/wIeYk8AUmGl
http://screencast.com/t/QLqnSmpy
I faced the same issue some days ago using fluidcontent. It seems, there is a bug in flux, which has been fixed in the GitHub repositories. You could try to switch to the development version of flux or wait for an official release on TER.

a slippery JSF syntax error

If I try to display a JSF 2 page on Tomcat 7.0.34 with:
jsf-api/impl 2.1.7
el-api 2.5
jstl 1.2
like this one:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:cis="http://java.sun.com/jsf/composite/comp">
<h:head>
<title>Prova errore di sintassi</title>
</h:head>
<h:body>
<f:view>
<ui:include src="/WEB-INF/include/menubar.xhtml" />
<h:form>
<p:ajaxStatus style="width: 32px;height: 32px;" />
<p:growl />
<p:panel id="pannello">
<p:focus />
<p:messages
showDetail="true"
globalOnly="true" />
<h:panelGrid columns="3">
<p:outputLabel
for="ckpensionat2"
value="Pens2"
title="tit x pens2"
style="padding-right: 3px; display: inline-block; min-width: 60px;" />
<p:selectBooleanCheckbox
id="ckpensionat2"
value="#{miocomp.pensionato}"
title="tit x pens2"
valueChangeListener="#{miocomp.pensCambiato}" />
</p:selectBooleanCheckbox>
<h:outputLabel value="pippo" />
</h:outputLabel>
<p:message for="ckpensionat2" />
<p:commandButton
value="agg"
update="pannello" />
</h:panelGrid>
</p:panel>
</h:form>
</f:view>
</h:body>
</html>
Nothing is showing!
please pay attention to the error of double closing tag
.../>
</p:selectBooleanCheckbox>
<h:outputLabel value="pippo" />
</h:outputLabel>
My questions are:
why </h:outputLabel> is evincted like a syntax error on Eclipse while </p:selectBooleanCheckbox> not
when I try to show this page I get a blank page. If I remove the error all goes fine.
no errors at all appears on my log view neither on tomcat 7 log dir
thanks in advance for any suggestions
It is a syntax error (invalid XML) since in <h:outputLabel value="pippo" />
</h:outputLabel> you close the tag twice; once with the /> end tag and secondly with the </h:outputLabel> element. Also, p:selectBooleanCheckbox doesn't have title attribute. I'm pretty sure IDE can't validate the rest of the document because of these errors, so it only complains about the first.
That's normal...
I believe you should increase the log level or change the javax.faces.PROJECT_STAGE parameter to Development in your app's web.xml

use clisp to download website

I am trying to use clisp to dump webpages like, e.g. to define a function "read-url", such that (read-url "http://www.kernel.org/index.html") would display the html source code like:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- $Id: index.shtml,v 1.422 2012/02/09 17:13:11 root Exp $ -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Linux Kernel Archives</title>
<link rel="icon" type="image/png" href="favicon.ico" />
<link rel="alternate" type="application/rss+xml"
title="Latest Linux Kernel Version RSS"
href="http://kernel.org/kdist/rss.xml" />
<link rel="stylesheet" href="/kernel.css" type="text/css" />
......
does anyone know how?
Many thanks!!
I would recommend using drakma: "a fully-featured web client".
Where you could easily write a function as:
(defun read-url (url)
(drakma:http-request url))
which will then return the corresponding (sent back by the server) html-code. It works very well and (as far as I explored it) bug-less.
try CLOCC/CLLIB/url.lisp, see with-open-url, url-get &c.