How to integrate this line in TYPO3
I tried
<link rel="preconnect" href="https://fonts.gstatic.com">
page.includeCSS {
file1 = https://fonts.gstatic.com
file1.external = 1
file1.preconnect = 1
}
but file1.preconnect not working correctly.
Related
I have created a TYPO3 webpage with subpages.
rootpage
-subpage1
--subpage1A
--subpage1B
-subpage2
--subpage2C
in the template of rootpage I added the following template
page = PAGE
page.includeCSS {
file1=fileadmin/projectTemplate/bootstrap.min.css
file2=fileadmin/projectTemplate/projectstylesheet.css
}
page.includeJS {
file1=fileadmin/projectTemplate/bootstrap.min.js
file2=fileadmin/projectTemplate/jquery.min.js
}
page.config.doctype=html5
page.meta.viewport = width=device-width, initial-scale=1
page.10 = FLUIDTEMPLATE
page.10 {
file = fileadmin/projectTemplate/index.html
partialRootPath = fileadmin/projectTemplate/Partials/
layoutRootPath = fileadmin/projectTemplate/Layouts/
settings.layout = Nuremberg
variables {
content < styles.content.get
contentRight < styles.content.getRight
}
}
#we also create a typoscript-menu
lib.menu = HMENU
lib.menu{
1 = TMENU
1.NO.wrapItemAndSub = <li>|</li>
}
The key here is page.meta.viewport = width=device-width, initial-scale=1. On the root page it results in <meta name="viewport" content="width=device-width, initial-scale=1"> in the head section of the page. However on all subpages this meta viewport is not rendered.
The typo3 version is a plain 8.7.12 with no added or custom extensions.
The workaround is to put the page.meta.viewport = width=device-width, initial-scale=1 as an extension template on every subpage. This is somehow quite an overhead. Is there any possibility to avoid this?
The URL is only partly transferred: https://....org/artikel/
Any idea how to solve this? Any other information needed?
Latest TYPO3 version 7.6.11, tx_news 5.2 and rx_shariff 9.0.0
Thanks for your help.
My problem was the canonical tag the missing addQueryString (thanks for the hint to Georg Ringer)
Here is my working code:
page.headerData {
700 = TEXT
700 {
stdWrap.typolink.parameter.data = TSFE:id
stdWrap.typolink.forceAbsoluteUrl = 1
stdWrap.typolink.returnLast = url
stdWrap.typolink.parameter.intval = 1
stdWrap.typolink.useCacheHash = 1
stdWrap.typolink.addQueryString = 1
stdWrap.typolink.addQueryString.method = GET
stdWrap.typolink.addQueryString.exclude = id, cHash
htmlSpecialChars = 1
wrap = <link href="|" rel="canonical" />
}
}
I'm using TYPO3 7.6.3with the great News-Extension from Georg Ringer news 4.1.0.
I need the Tag-Search from tx_newsas a Select-Box, so I include the Plugin and change the Template /EXT:myext/Resources/Private/Extensions/News/Templates/Tag/List.html from a ul/li-List to the selectbox. This part is working fine!
But I need this select-box not as a Content Element, I need it at my Footer-Navigation, which I made with TypoScript. How can I use the tx_news-Template (Tag/List.html) into my Footer-Partial?
Here's the screen:
My version of the tag-list .. as a search box
I'v tried it like this ..
...
20 = CONTENT
20 {
table = tx_news_domain_model_tag
select {
selectFields = tx_news_domain_model_tag.title
orderBy = tx_news_domain_model_tag.title asc
### pid folder 'tags'
pidInList = 32
}
renderObj = COA
renderObj {
10 = TEXT
10.field = uid
10.wrap = <option value="|">
10.wrap.insertData = 1
20 = TEXT
20.field = title
20.wrap = |</option>
20.wrap.insertData = 1
}
}
20.wrap = <form method="get" action="/index.php"><input type="hidden" name="id" value="17" /><select name="tx_news_pi1[overwriteDemand][tags]"><option value="" selected>Tag Suche</option>|</select></form>
...
and it works (thanks colin!)!
Also helpful: https://www.auxnet.de/typo3-datenbankabfragen-mit-typoscript/
Im trying to show a LIB on some pages, but i dont want to shwo it on page UID 7.
But the lib is not showed at all, have tryed to look at the Uid 3-4-5-6 and 7.
I have this TS code.
[globalVar = TSFE:id <> 7]
lib.siteContact = COA
lib.siteContact {
wrap = <div class="pagecontent-box-content" id="pagecontent-box-content-59">|</div>
10 = TEXT
10.value = <h2><em>Kundeservice</em></h2>
20 = TEXT
20.value = <img alt="" src="fileadmin/templates/add/images/kundeservice.jpg" style="width: 166px; height: 89px; border-width: 0px; border-style: solid;" /><br />
30 = TEXT
30.value = <h2><em>Tlf. 69 144 145</em></h2><br />
}
[end]
What do i do wrong
I think there's no unequal sign in TypoScript conditions. One way to do negations would be to use the else statement.
[globalVar = TSFE:id = 7]
lib.siteContact = COA
lib.siteContact {
...
}
[else]
...
[global]
Show your lib on all pages and clear (or override) it if UID is 7:
lib.siteContact = COA
lib.siteContact {
// rest of your code
}
[globalVar = TSFE:id = 7]
lib.siteContact >
[end]
I created my own custom template and backend layout.
Here is my backend layout code :
backend_layout {
colCount = 3
rowCount = 2
rows {
1 {
columns {
1 {
name = Solution 1
colPos = 1
}
2 {
name = Solution 2
colPos = 0
}
3 {
name = Solution 3
colPos = 2
}
}
}
2 {
columns {
1 {
name = Products 1
colPos = 3
}
2 {
name = Products 2
colPos = 4
}
3 {
name = Products 3
colPos = 5
}
}
}
}
}
Here is my custom template, I just have included the section of html file :
<div class="row" id="solution">
<!-- ###SOLUTIONLEFT### Start-->
<!-- ###SOLUTIONLEFT### End-->
<!-- ###SOLUTIONMID### Start-->
<!-- ###SOLUTIONMID### End-->
<!-- ###SOLUTIONRIGHT### Start-->
<!-- ###SOLUTIONRIGHT### End-->
</div>
<div class ="row" id="product">
<!-- ###PRODUCTLEFT### Start -->
<!-- ###PRODUCTLEFT### End -->
<!-- ###PRODUCTMID### Start -->
<!-- ###PRODUCTMID### End -->
<!-- ###PRODUCTRIGHT### Start -->
<!-- ###PRODUCTRIGHT### End -->
</div>
My page template code is :
page.10.subparts {
SOLUTIONLEFT< styles.content.getLeft
SOLUTIONMID< styles.content.get
SOLUTIONRIGHT< styles.content.getRight
PRODUCTLEFT < styles.content.getLeft
PRODUCTMID < styles.content.get
PRODUCTRIGHT < styles.content.getRight
}
I am trying to display product page info in second row. I am not able to do. So how to display it. Am I following proper way for creating template in typo3?
Can i do something like PRODUCTLEFT = style.content.getLeft.select = where row = 1 to display content from second row in backend?
You are nearly correct. You just need to specify the colPos from the Backend Layout of the content you want to assign to a subpart in your TypoScrip:
page.10.subparts {
...
PRODUCTLEFT < styles.content.get
PRODUCTLEFT.select.where = colPos=3
...
}
styles.content.get styles.content.getLeft and styles.content.getRight are just preconfigured for the default colPos configuration TYPO3 shipps out of the box (0, 1 and 2).