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

Also available in: Atom PDF