I need to overwrite page attributes (e.g. canonical links) with fluid.
The concept of just adding it does not work, because afterwards there would be two canonical links:
<n:headerData>
<link rel="canonical" href="{newsItem.link}">
</n:headerData>
How can I get the page data from TYPO3 to overwrite the attribute?
As far as I can find, there is no option to modify the canonicaltag.
here you can find the hint that only one extension can be active to generate the canonical tag.
and here (german) you find the only solution to deactivate ext:seo to build an own canonical tag.
Related
I have a website in TYPO3, it has a header and footer and a load of generated page links.
Is there any parameters or TypoScript that can be used that would enable all links to have absolute paths? e.g. the item that generates the menu might look like
<f:cObject includeAbsolutePath="true" typoscriptObjectPath="lib.content_subMenu" />
I basically need all page links to be absolute.
I am using Typo3 V7.6
config.absRefPrefix might be your solution. But this could lead to drawbacks as well, e.g. in multi-domain environments. But in that case, you might work with conditions to set a proper domain name.
See details in the documentation.
There are a number of viewhelpers which can be used in Fluid. The f:link and f:uri seem to do basically the same thing.
For example:
f:link.external :
"A ViewHelper for creating links to external targets."
f.uri.external :
"This ViewHelper creates a link to an external page"
This results in the following questions:
What's the difference between f.link.external and f.uri.external (and which is supported in which Fuid / TYPO3 version?).
For which TYPO3 version is the documentation "Extbase Guide"? Because usually you see a version in lower left column, here it just shows 'latest'.
What is the best up-to-date resource for Fluid ViewHelpers using TYPO3 8?
All link viewhelpers in Fluid render a full HTML link, so <a href="..." ...>...</a>. In comparison all uri viewhelpers only render the URI, thus what would end up within href of a link or e.g. a src() in CSS.
The Extbase guide is rarely updated and there is no real version dependency. If at all it applies to the latest LTS but you'll find outdated info here and there.
There are some docs around the net which cover parts of Fluid but there is no definite guide which contains everything. Here are a few resources:
Viewhelpers reference in Fluid powered TYPO3
Viewhelpers in the Fluid Guide
Source code of TYPO3 Fluid
Source code of TYPO3
You are very welcome to improve the docs wherever you see something amiss. :-)
f.link.external actually creates a link and f.uri just outputs the uri.
f.link.external
Fluid Source:
<f:link.external uri="https://typo3.org">f.link.external</f:link.external>
Result:
f.link.external
f.uri.external
Fluid Source:
<f:uri.external uri="https://typo3.org">f.uri.external</f:uri.external>
Result:
https://typo3.org
It might be a good idea to update the documentation for f.uri.external because it is misleading.
IN TYPO3 versions before 7.6 it was possible to render links inside the content element HTML by using the TypoScript
tt_content.html.parseFunc.tags.link < lib.parseFunc.tags.link
This does not work anymore since 7.6. How can it be solved?
If you use fluid_styled_content, override the HTML.html and want to use forms and have the Typo3 link tags <link>text</link> converted to html links, you will have to use this (at least this worked for me, both custom html forms were working and links were converted):
<f:format.htmlentitiesDecode>
<f:format.html parseFuncTSPath="lib.parseFunc">
{data.bodytext}
</f:format.html>
</f:format.htmlentitiesDecode>
There are a couple of possible solutions for this question.
1.) Use fluid_styled_content.
I guess that now fluid_styled_content instead of css_styled_content is used. Therefore the used TypoScript does not work anymore. A valid solution would be to switch back to css_styled_content. However that is the old ancient way and for newer projects you shouldn't do this.
2.) Override the template of fluid_styled_content.
If you open the template of fluid_styled_content and the HTML element, found at typo3/sysext/fluid_styled_content/Resources/Private/Templates/Html.html you will see
<f:format.raw>{data.bodytext}</f:format.raw>
this must be changed to
<f:format.html>{data.bodytext}</f:format.html>
Overriding is described in the docs, see https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/7.6/Configuration/OverridingFluidTemplates/Index.html
I am looking for a way to be able to set some content dynamically in the layout of a typo3 site.
For example, is there a way to set dynamically the title of the site?
So, I am wondering if is it possible to define some variables in Page TSConfig area as shown in the following image.
This option would be very usefull in cases where users are not so experienced to edit this content from Template tools --> Setup.
Thanks a lot!!!
Only admins have access to pages TSconfig field. They have access to the template record (and the TypoScript module) too.
Therefore you should use constants instead which do exactly what you want to archive.
Have a look at the TYPO3 documentation: https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/TypoScriptTemplates/Index.html
Define in constants:
# cat=page type=string; label=Page Title
title = foo
And use in setup:
config.pageTitle = {$title}
We're experiencing some inconsistency with URLs on our publish instance. Some links are having the /content/project/ removed whilst others are not.
The /etc/map has been created and seems to be working as expected, except for these links.
An example of where the rewriting is links in the OOTB Text component.
Just highlighted the text and used the hyperlink in the RTE.
The output HTML on publish comes through as the desired
<a adhocenable="false" href="/path/support.html">My Link</a>
A link that's not being rewritten is from a component, in it's dialog we have a richtext xtype that is referenced in the jsp
<cq:text property="description">
This however is output on the publish as:
<a adhocenable="false" href="/content/project/path/support.html">Other Link</a>
I've had a look in /system/console/configMgr and the Day CQ Link Transformer Checker and this has a:href, area:href, from:action, input:value. So I thought this would pick up the links under anchors.
If anyone can suggest where I should be looking to resolve this, any help would be appreciated.
Upon further investigations I noticed that the links that were not working were contained in tags, and therefore not rewritten by AEM