Project

General

Profile

Actions

Feature #45488

closed

Support meaningful COA keys

Added by Thomas Klose almost 12 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2013-02-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
easy
Sprint Focus:
On Location Sprint

Description

This patch add the possibility to use meaningful COA Keys.

It would be possible to use TypoScript like this:

plugin.tx_foobar.10_heading.10_bordertop.wrap = |
plugin.tx_foobar.30_footer.100_innertext.value = lorem ipsum

instead of:

plugin.tx_foobar.10.10.wrap = |
plugin.tx_foobar.30.100.value = lorem ipsum

This is way better to understand.

The Patch changes the sortedKeyList function in t3lib/class.t3lib_tstemplate.php.
Basically replacing t3lib_utility_Math::canBeInterpretedAsInteger($key) with preg_match('/^\d+.*/', $key) wich will match on all Integer values and every string beginning with an Integer.

This is a use-it-if-you-want-to feature, means you could user the actual way with integer-only keys in COA as well as the named keys.


Files

class.t3lib_tstemplate.php.patch (1.2 KB) class.t3lib_tstemplate.php.patch Thomas Klose, 2013-02-14 16:42
Actions #2

Updated by Chris topher almost 12 years ago

  • Subject changed from support meaningfull COA keys to Support meaningful COA keys
Actions #3

Updated by Georg Ringer over 11 years ago

  • Status changed from New to Needs Feedback

can you please add a unified diff or push the change directly to gerrit by using git?

Actions #4

Updated by Thomas Klose over 11 years ago

Georg Ringer wrote:

can you please add a unified diff or push the change directly to gerrit by using git?

you can find one under comment 1

Actions #5

Updated by Alexander Opitz over 11 years ago

Hi Thomas,

the patch looks nice, can you update it to latest master and add it to gerrit?

Actions #6

Updated by Alexander Opitz almost 11 years ago

Hi Thomas,

the patch looks nice, can you update it to latest master and add it to gerrit?

Actions #7

Updated by Markus Klein over 10 years ago

  • Status changed from Needs Feedback to Accepted
  • Complexity changed from no-brainer to easy

Ping, please provide a patch for current master and push it to Gerrit.
Don't forget about the necessary documentation update ticket in the respective project here on forge.

Actions #8

Updated by Riccardo De Contardi almost 8 years ago

  • Target version set to 9 LTS
Actions #9

Updated by Sybille Peters over 6 years ago

Thank you for your report.

Even though it has been some time, would you consider checking if your patch idea is still up to date and upload it to our Gerrit review server?

Someone could do this for you, but I am thinking you might like the opportunity to contribute to TYPO3 yourself.

You can find a description of the TYPO3 contribution workflow here: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

Hint: If you get stuck anywhere, ask on Slack in the #typo3-cms-coredev channel. You can register in the TYPO3 slack workspace here: https://forger.typo3.com/slack

Thank you in advance!

Actions #10

Updated by Susanne Moog about 6 years ago

  • Target version changed from 9 LTS to Candidate for Major Version
Actions #11

Updated by Susanne Moog about 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #12

Updated by Nicolai Schirawski about 6 years ago

I would refuse the original suggestion.

The reason:

you open up endless possibilities to write the same

plugin.tx_foobar.10.wrap = |
plugin.tx_foobar.10_heading.wrap = |
plugin.tx_foobar.10_another.wrap = |
plugin.tx_foobar.10_... .wrap = |

basically everything after the underscore is meant as a comment

So this should go into a comment:

# 10 = heading
plugin.tx_foobar.10.wrap = |

This clarifies the situation with available tools.

Actions #13

Updated by Benni Mack about 6 years ago

  • Status changed from Accepted to Rejected
Actions

Also available in: Atom PDF