Project

General

Profile

Actions

Feature #14472

closed

Ranges in ID lists

Added by Wolfgang Klinger over 19 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
-
Start date:
2004-12-28
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I would like to write

temp.menu.excludeUidList = 23-28,30,100-102

instead of

temp.menu.excludeUidList = 23,24,25,26,27,28,30,100,101,1002

the same applies for e.g. [PIDinRootline] and other occurences of such lists...

(issue imported from #M646)


Files

0000646-expandList.php (418 Bytes) 0000646-expandList.php Administrator Admin, 2005-03-03 13:39
Actions #1

Updated by Sacha Vorbeck about 19 years ago

I would like to add that I`d love to have stdWrap properties for e. g. excludeUidList.. This might be a solution for the original problem as well.

Actions #2

Updated by Martin Kutschker about 19 years ago

I've attached a small helper for t3lib_div that may come in handy for all kind of lists (eg HMENU special=list special.value=1,2,3,4,...)

Actions #3

Updated by Martin Kutschker over 18 years ago

See t3lib_div:expandList().

Actions #4

Updated by Ernesto Baschny about 18 years ago

Yes, also nice would be resolving aliases in "special.value" and other uid-lists.

It makes no sense to me to hard-code "uids" in TypoScript. If I export/import the page structure, the ids might be different and I have to adapt the uidlists. Aliases are there for this, aren't they? "home", "servicemenu" etc.

Actions #5

Updated by Ingmar Schlecht about 18 years ago

Ernesto Baschny wrote:

Yes, also nice would be resolving aliases in "special.value" and other uid-lists.

This would be fantastic! Could you write a patch for it?

cheers,
Ingmar

Actions #6

Updated by Martin Kutschker about 18 years ago

To be consistent resolving of aliases should be done in all UID properties, not only lists, eg in pi_base.

Actions #7

Updated by Ernesto Baschny about 18 years ago

I don't think pi_base should be doing alias translation or any other "magic" on uid-lists. If a extension developer needs this functionality, he can call getPageIdFromAlias() himself (which would be nice thing e.g. in tt_news for all those page-id settings)

But with TypoScript there is currently no way to have this done if PHP doesn't do it. So I think we should just find TS-properties where the user is expected to pass uid's or uid-lists and make them all "alias" and maybe "range" compatible.

The places that I've found so far:

>select.uidInList
>select.pidInList
->typolink.parameter (already doing alias-conversion)

- config.MP_mapRootPoints (allows "root" magic word, so we shouldn't be trying to do alias conversions here
- config.typolinkLinkAccessRestrictedPages (allows "NONE" magic word, which cannot be an alias (upper-case). But can we do alias-checking in "config." already?)
- HMENU.special.value
- HMENU.excludeUidList
- HMENU.alwaysActivePIDlist
- HMENU.special.[item].uid (in special=browse)

Ok, I haven't found any other.

And finally we need a stdWrap function to convert an alias to an uid, so that we can use this functionality on any other property that is already being stdWrapped. Imagine that tt_news passes $conf['backPid.'] through stdWrap:

plugin.tt_news.backPid = newsarchive
plugin.tt_news.backPid.asPidList = 1

which would instruct stdWrap to consider the property as a list of uids and it would then translate aliases, translate ranges, etc and return a proper comma-separated list of UIDs back to the caller.

Actions #8

Updated by Mr. Hudson almost 13 years ago

Patch set 1 of change I6d25e0ccac47218445713f3b491a2109188ca579 has been pushed to the review server.
It is available at http://review.typo3.org/2585

Actions #9

Updated by Mr. Hudson almost 13 years ago

Patch set 2 of change I6d25e0ccac47218445713f3b491a2109188ca579 has been pushed to the review server.
It is available at http://review.typo3.org/2585

Actions #10

Updated by Mr. Hudson almost 13 years ago

Patch set 3 of change I6d25e0ccac47218445713f3b491a2109188ca579 has been pushed to the review server.
It is available at http://review.typo3.org/2585

Actions #11

Updated by Mr. Hudson over 12 years ago

Patch set 4 of change I6d25e0ccac47218445713f3b491a2109188ca579 has been pushed to the review server.
It is available at http://review.typo3.org/2585

Actions #12

Updated by Xavier Perseguers over 12 years ago

  • Status changed from Accepted to Resolved
  • Target version changed from 0 to 4.6.0-beta1
  • % Done changed from 0 to 100
  • TYPO3 Version changed from 3.7.0 to 4.6

Change has been successfully cherry-picked as d83d13911efa1296c98634eccc0fd60f17493588.

Actions #13

Updated by Xavier Perseguers about 12 years ago

  • Status changed from Resolved to Closed
Actions #14

Updated by Ernesto Baschny almost 11 years ago

  • Target version deleted (4.6.0-beta1)
Actions

Also available in: Atom PDF