Project

General

Profile

Actions

Feature #16864

closed

Function pi_wrapInBaseClass in tslib/class.tslib_pibase.php

Added by Thomas Janke about 17 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-01-17
Due date:
% Done:

0%

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

Description

This function produces div-tags around html-output of certain extensions (newloginbox).
Generated comments can be disabled via TS config.disablePrefixComment = 1 but the div-tags will allway produced.
It would be nice if this feature (div-tag-generation around plugin-code) could be disabled vi TS. So that we have more control over the generated html and more flexibility.
The problem was already discussed at (17.01. / 11:04 Code-Ă„nderungen im CORE...)

Greeting und thank a lot Thomas

(issue imported from #M4801)


Files

disable_base.diff (889 Bytes) disable_base.diff Administrator Admin, 2007-04-28 01:00

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #19796: pi_wrapInBaseClass should not wrap the div if content is emptyClosedSteffen Kamper2009-01-12

Actions
Is duplicate of TYPO3 Core - Feature #19809: make pi_wrapInBaseClass wraps configurableRejected2009-01-13

Actions
Actions #1

Updated by Oliver Hader about 17 years ago

I agree to the statement, that such wraps should be set in typoscript and there should be default setting for it. The wrap you mentioned is mostly used for CSS reasons, to give it a CSS-namespace.

But, there could be an extension-dependent configuration like this one:

plugin.tx_myext_pi1 {
disableWrapInBaseClass = 1
}

If the php extension file itself (e.g. pi1/class.tx_myext_pi1.php) puts the $conf to $this->conf in the main-function, pi_wrapInBaseClass could get knowledge of this configuration.

Actions #2

Updated by Tomas Mrozek almost 17 years ago

+1

A developer needs to have control over every piece of HTML code outputed. No matter how "harmless" a div tag looks, there are situations when an extra div is a pain in the...

Actions #3

Updated by Michael Scharkow almost 17 years ago

Since we cannot do this per-extension, I uploaded a patch to disable this globally. Use config.disableBaseClassWrap = 1 in your TS setup

Actions #4

Updated by Bastiaan almost 17 years ago

Thank you! Finally some control back ;)

Actions #5

Updated by Dmitry Dulepov almost 17 years ago

I think it should be possible to do it for extension. The code in pi_wrapInBaseClass should check for the TSConfig options that is constructed like:

$TSConfigKey = 'plugin.' . $this->prefixId . 'disableWrapInBaseClass';

Actions #6

Updated by Steffen Kamper almost 17 years ago

yes, i think too, because some extensions come with default css defined with the wrapclass, otherwise this css will not work any longer.
So the easies way would be a setting for extension, that prevent the wrapping like
plugin.tx_ext_pi1.disableWrapInBaseClass = 1

and in pi_wrapInBaseClass

$content = $this->conf['disableWrapInBaseClass '] ? $str : '<div class....

Actions #7

Updated by Christian Kuhn almost 14 years ago

Resolved as duplicate of #19809

Actions #8

Updated by Chris topher almost 12 years ago

  • Assignee deleted (Michael Scharkow)
  • Target version deleted (0)
  • PHP Version deleted (4)
Actions #9

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF