Task #50192

Story #50191: As an integrator I want an extensible way of including JavaScript and CSS

TypoScript: Create tag-based object

Added by Christopher Hlubek over 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Should have
Category:
Content Rendering
Target version:
Start date:
2013-07-19
Due date:
% Done:

100%


Description

There should be a TypoScript object that makes it easy to render all kinds of tag based output and to manipulate attributes in a safe and extensible way.

Example:


// Default configuration
page.bodyTag = Tag {
    tagName = 'body'
    omitClosingTag = TRUE
}

// Extension in custom site package
page.bodyTag {
    attributes {
        class = 'landing-page'
        id = 'product-a'
    }
}

Idea for CSS classes:

- Use (new) processors on class Attribute: class.@processors.myClass = ${String.append('my-class')}
- Maybe add special support for classes attribute that allows whitespaced concatenation using some kind of Array (e.g. classes.myClass ="my-class")

History

#1 Updated by Gerrit Code Review over 7 years ago

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

#2 Updated by Christopher Hlubek over 7 years ago

  • Status changed from Accepted to Under Review

#3 Updated by Gerrit Code Review over 7 years ago

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

#4 Updated by Adrian Föder over 7 years ago

Christopher, similar to "classes" could work "styles", but with a semicolon "implosion". WDYT?

#5 Updated by Gerrit Code Review over 7 years ago

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

#6 Updated by Gerrit Code Review over 7 years ago

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

#7 Updated by Gerrit Code Review about 7 years ago

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

#8 Updated by Christopher Hlubek about 7 years ago

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

Applied in changeset commit:cfc64cf0bec9b598cebc9e1e35dcab540caf1762.

Also available in: Atom PDF