[BUGFIX] Support target in fluid_styled_content menus 60/54160/4
authorMats Svensson <mats@pixelant.se>
Tue, 12 Sep 2017 13:06:22 +0000 (15:06 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Wed, 20 Sep 2017 11:14:36 +0000 (13:14 +0200)
Add condition and only render target attribute if set on page.

Resolves: #82464
Releases: master, 8.7
Change-Id: I14c561188f1e8a7389b145adf85c64918e61d461
Reviewed-on: https://review.typo3.org/54160
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Sascha Wilking <sascha.wilking@hmmh.de>
Tested-by: Sascha Wilking <sascha.wilking@hmmh.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuAbstract.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuCategorizedPages.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuPages.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuRecentlyUpdated.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuRelatedPages.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuSection.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuSectionPages.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuSitemap.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuSitemapPages.html
typo3/sysext/fluid_styled_content/Resources/Private/Templates/MenuSubpages.html

index d4883f6..5e003d7 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                        <f:if condition="{page.data.abstract}">
index 99cbf7e..128bb4a 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                </li>
index 99cbf7e..128bb4a 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                </li>
index 99cbf7e..128bb4a 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                </li>
index 99cbf7e..128bb4a 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                </li>
index f725a2f..e4fc0e8 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                        <f:if condition="{page.content}">
@@ -14,7 +14,7 @@
                                                        <f:for each="{page.content}" as="element">
                                                                <f:if condition="{element.data.header}">
                                                                <li>
-                                                                       <a href="{page.link}#c{element.data.uid}" target="{page.target}" title="{element.data.header}">
+                                                                       <a href="{page.link}#c{element.data.uid}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{element.data.header}">
                                                                                <span>{element.data.header}</span>
                                                                        </a>
                                                                </li>
index 93ae6b2..c3d3bf9 100644 (file)
@@ -6,14 +6,14 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                        <f:if condition="{page.content}">
                                                <ul>
                                                        <f:for each="{page.content}" as="element">
                                                                <li>
-                                                                       <a href="{page.link}#c{element.data.uid}" target="{page.target}" title="{element.data.header}">
+                                                                       <a href="{page.link}#c{element.data.uid}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{element.data.header}">
                                                                                <span>{element.data.header}</span>
                                                                        </a>
                                                                </li>
index dc8f091..59b2786 100644 (file)
@@ -11,7 +11,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                        <f:render section="Menu" arguments="{menu: page.children}" />
index dc8f091..59b2786 100644 (file)
@@ -11,7 +11,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                        <f:render section="Menu" arguments="{menu: page.children}" />
index 99cbf7e..128bb4a 100644 (file)
@@ -6,7 +6,7 @@
                <ul>
                        <f:for each="{menu}" as="page">
                                <li>
-                                       <a href="{page.link}" target="{page.target}" title="{page.title}">
+                                       <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                                                <span>{page.title}</span>
                                        </a>
                                </li>