Feature #35891

Possibility to add icons in addItems()

Added by Philipp Mueller over 7 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2012-04-12
Due date:
% Done:

100%

PHP Version:
5.3
Tags:
Complexity:
easy
Sprint Focus:

Description

Hello

At the time it's not possible to add an icon in a FlexForm-Selectfield by TSconfig.

In the current version we use this TSconfig to add an item in flexform:

Syntax:
TCEFORM.tt_content.pi_flexform.myext_pi1.sDEF.myselector.addItems {
mynewitem = <label>
}

For example:
TCEFORM.tt_content.pi_flexform.myext_pi1.sDEF.myselector.addItems {
mynewitem = LLL:EXT:myext/locallang_ff.xml:mynewitemlabel
}

I suggest that we extend the syntax like this:

Syntax:
TCEFORM.tt_content.pi_flexform.myext_pi1.sDEF.myselector.addItems {
mynewitem = <label>|<icon>
}

For example:
TCEFORM.tt_content.pi_flexform.myext_pi1.sDEF.myselector.addItems {
mynewitem = LLL:EXT:myext/locallang_ff.xml:mynewitemlabel|EXT:myext/myicon.png
}

I have attached a patch to extend t3lib_TCEforms::addItems().

Best Regards
Philipp

IconInAddItems.patch View (1.24 KB) Philipp Mueller, 2012-04-12 10:44

Associated revisions

Revision 0528f4fd (diff)
Added by Benni Mack almost 5 years ago

[FEATURE] FormEngine: Possibility to add icons via pageTSconfig

If someone adds a new value/label pair for a select field in
TCEforms/FormEngine, it is not possible to also add an icon to
the new option.
Alternatively, existing values can be changed through the new
"altIcons" property that acts like the "altLabels" property.

The patch adds another subelement for TSconfig to also add an
icon, as well as a new property.

TCEFORM.pages.doktype.addItems {
13 = My Label
13.icon = sysext/t3skin/icons/gfx/i/pages.gif
}
TCEFORM.pages.doktype.altIcons {
123 = EXT:myext/icon.gif
}

The icon path must be relative to the typo3/ directory.

Resolves: #35891
Releases: master
Documentation: #49752
Change-Id: Ic835b1fe350144bc3498eab9a19857e3f558088d
Reviewed-on: http://review.typo3.org/22067
Reviewed-by: Alessandro Bellafronte <>
Reviewed-by: Christoph Dörfel <>
Reviewed-by: Michel Georgy <>
Tested-by: Susanne Moog <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

History

#1 Updated by Steffen Ritter over 7 years ago

  • Target version deleted (4.7.0)

#2 Updated by Steffen Ritter over 7 years ago

  • TYPO3 Version changed from 4.7 to 6.0

#3 Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22067

#4 Updated by Christoph Dörfel about 6 years ago

Since icons are now included for ".addItems", shouldn't there be a ".altIcons" setting, similar to ".altLabels"?

#5 Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22067

#6 Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22067

#7 Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22067

#8 Updated by Gerrit Code Review almost 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/22067

#9 Updated by Benni Mack almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100

#10 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF