tx_news / eventnews: Setting PAGE_TSCONFIG_IDLIST for organizer and location

651 views Asked by At

For tx_news I can define (via Page TSconfig) e.g. a list of PIDs from where to select the available system categories for a news record. The tsConfig would look like this:

TCEFORM.tx_news_domain_model_news.categories.PAGE_TSCONFIG_IDLIST = 12345,12346,12347

Now my Question: Is something like this possible for the organizer and location records coming with tx_news based eventnews? So the organizer and location items available on a eventnews record will be filtered by their PID? I tried sth. like this:

TCEFORM.tx_news_domain_model_news.organizer.PAGE_TSCONFIG_IDLIST = 12345
TCEFORM.tx_news_domain_model_news.location.PAGE_TSCONFIG_IDLIST = 12345

But it didn´t work, so I guess it is not implemented yet. Does anybody know another way to get this done, a workaround or something?

1

There are 1 answers

2
René Pflamm On BEST ANSWER

You must modify the TCA of the tx_news_domain_model_news.organizer and tx_news_domain_model_news.location to archive this.

As you can see here and here there is no marker like ###PAGE_TSCONFIG_IDLIST### as referenced here.

You should make it like this:

$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['organizer']['config']['foreign_table_where'] = ' AND pid IN (###PAGE_TSCONFIG_IDLIST###) ORDER BY tx_eventnews_domain_model_organizer.title';
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['location']['config']['foreign_table_where'] = ' AND pid IN (###PAGE_TSCONFIG_IDLIST###) ORDER BY tx_eventnews_domain_model_location.title';