Project

General

Profile

Actions

Feature #21486

closed

Module web_layout should allow to force-show other tables

Added by Ralf Strobel about 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-11-06
Due date:
% Done:

0%

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

Description

The "page view" will always show a box and new-element-icon for tt_content, but not for other tables like tt_news even if they are configured to be displayed in this view as well.

Especially since the "create new record" link has been removed from page view, this option is very desireable at least for some pages. Because if users only get access to this module but not the list view, they have no way of inserting items into other tables, if there are none of the same type in that page already. Also, for news folders, you might even want to disable the standard content section.

This functionality can be added by just a few additions to the code...
(See Additional Information)

/typo3/sysext/cms/layout/class.tx_cms_layout.php

  1. function getTableMenu($id) #########

Replace:

// If records were found (or if "tt_content" is the table...):
if ($c || t3lib_div::inList('tt_content',$tName)) {

By:

$forceTables = $GLOBALS['BE_USER']->getTSConfig('mod.web_layout.forceTables',t3lib_BEfunc::getPagesTSconfig($id));
if ($forceTables['value']) $forceTables = str_replace(' ','',$forceTables['value']); else $forceTables = 'tt_content';
// If records were found (or if display forced in TSconfig):
if ($c || t3lib_div::inList($forceTables,$tName)) {

  1. function makeOrdinaryList(....) #########

remove the condition:

if ($dbCount)    {

This is because for other tables, if there are no records, the list including the "new" icon would not be displayed.
(issue imported from #M12497)

Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF