http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692017-06-16T22:17:06ZTYPO3 ForgeTYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3352782017-06-16T22:17:06ZAnonymous
<ul></ul><p>Did you try TypoScript overrides? <a class="external" href="https://docs.typo3.org/typo3cms/drafts/code.tritum.de/TYPO3.CMS/Form_Documentation/Concepts/Index.html#typoscript-overrides">https://docs.typo3.org/typo3cms/drafts/code.tritum.de/TYPO3.CMS/Form_Documentation/Concepts/Index.html#typoscript-overrides</a><br />It's not exactly what you want, but sounds useful and I guess you could use constants there.</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3354152017-06-19T08:09:36ZWolfgang Freundwolfgang.freund@wlwwt.de
<ul></ul><p>Yes already tried that. For me the approach with constants within the YAML file feels cleaner.<br />Nevertheless I tried some finisher overrides (for example the mail subject) and it does not seem to work in all cases...</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3405492017-09-13T10:22:08ZDenis Mir
<ul></ul><p>The TS overrides are ok but constructs like</p>
<pre><code class="text syntaxhl" data-language="text">plugin.tx_form {
settings {
formDefinitionOverrides {
SomeForm {
renderables {
0 {
renderables {
4 {
properties {
privacyPageUid = {$plugin.someExt.general.privacyPagePid}
}
}
}
}
}
}
}
}
}
</code></pre>
<p>are not really nice since you have to hard code the indexes in the array which fail when something gets added in between in the configuration file. It would be a lot better to be able to use TS constants in the YML file.</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3609792018-03-16T00:19:10ZRalf Zimmermannralf.zimmermann@tritum.de
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed child parent" href="/issues/84133">Feature #84133</a>: Variants - Frontend implementation</i> added</li></ul> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3609812018-03-16T00:21:06ZRalf Zimmermannralf.zimmermann@tritum.de
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs Feedback</i></li><li><strong>Assignee</strong> set to <i>Wolfgang Freund</i></li></ul><p>I think your use case can be handled with variants <a class="issue tracker-2 status-5 priority-4 priority-default closed child parent" title="Feature: Variants - Frontend implementation (Closed)" href="http://forge.typo3.org/issues/84133">#84133</a>.<br />Feel free to test the patchset :)</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3673372018-06-21T14:06:10ZChristian Ludwigcl@viazenetti.de
<ul></ul><p>The use of variants is really nice and useful but with constants you have imho some advantages.</p>
<ul>
<li>You can centralize the things that need to be changed when moving to an other production stage. So simply changing or adding condition to one file will have effects to the complete installation.</li>
</ul>
<ul>
<li>When email addresses change, you will have one place to check and update.</li>
</ul>
<ul>
<li>It is possible to change constants within the page tree in a sub template (will break the two other advantages).</li>
</ul>
<p>Or are all these things possible with <a class="issue tracker-2 status-5 priority-4 priority-default closed child parent" title="Feature: Variants - Frontend implementation (Closed)" href="http://forge.typo3.org/issues/84133">#84133</a>?</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3673392018-06-21T14:30:36ZDenis Mir
<ul></ul><p>Indeed Christian Ludwig is right.</p>
<p>For example we use constants as the one single entry point for configuration of the whole TYPO3 installation depending on locale, context and other conditions. We configure everything from one constants file sitting in our main extension. (every custom/sysext/third party extension including its plugins, modules etc.)</p>
<p>Variants look nice but I don't get why we need to duplicate all the functionality already available with constants. In addition it spreads the configuration all over our setup and adds another configuration point.</p>
<p>Variants do blow up the YAML file even further when it could be as easy as just reading the value from a constant.</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=3975882019-04-04T18:37:09ZBjörn Jacobbjoern.jacob@tritum.de
<ul><li><strong>Status</strong> changed from <i>Needs Feedback</i> to <i>New</i></li><li><strong>Assignee</strong> deleted (<del><i>Wolfgang Freund</i></del>)</li><li><strong>Priority</strong> changed from <i>Should have</i> to <i>Could have</i></li><li><strong>PHP Version</strong> deleted (<del><i>7.1</i></del>)</li></ul> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=4102402019-11-23T12:01:04ZMathias Brodalambrodala@pagemachine.de
<ul></ul><p>Thanks to <a class="issue tracker-2 status-5 priority-4 priority-default closed child parent" title="Feature: Support "imports" within forms setup files (Closed)" href="http://forge.typo3.org/issues/84203">#84203</a> you can now <a href="https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Feature-86409-AllowUsageOfEnvironmentVariablesInSiteConfiguration.html" class="external">use placeholders</a> in form setup files. With this, you can set up a form element definition using e.g. environment variables.</p>
<p>Notice that placeholders (and imports, see <a class="issue tracker-2 status-5 priority-4 priority-default closed child parent" title="Feature: Support "imports" within forms form definition files (Closed)" href="http://forge.typo3.org/issues/84204">#84204</a>) are currently still not supported in form definition files. That's why you need to use form setup files and form element definitions therein.</p>
<p>Does this help already?</p> TYPO3 Core - Feature #81593: Usage of constants in YAML fileshttp://forge.typo3.org/issues/81593?journal_id=4172832020-03-02T14:53:59ZGeorg Ringer
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>closing this issue as constants is not the way to go for several reasons, one is that it needs quite much time to fetch all TS including all conditions to find the values. <br />environment variables are the way to go.</p>
<p>ps: greetings to wlwwt</p>