Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!!!][FEATURE] Modernize metadata rendering #84

Merged
merged 8 commits into from
Jun 28, 2019

Conversation

benjaminkott
Copy link
Member

@benjaminkott benjaminkott commented Jun 3, 2019

The metadata implementation for authors, categories, tags, publish date
and comments were really hard to customize. It was used in multiple
places and was also reliant on font awesome for icons.

To provide a better out of the box experience the templates were
completely refactored and rebuilt from the ground up. A generic set was
introduced that provides a lot of flexibility without the need to touch the
templates at all. This set is now replacing all current usages of the
metadata.

The old metadata plugin will now throw a deprecation message and is
planned to be removed with Version 11. Instead of using the old one, there
are now two new plugins for post header and post footer that can be
configured individually through TypoScript constants. While the post
header plugin will also render the post title, the post footer will only render
the metadata for now. Also, the list rendering of posts has now two
dedicated sections for rendering the metadata.

Each section like authors or categories can be configured per position.
If you do not want to have a section rendered at all, you can also simply
disable it. If comments are disabled for a post, the comment section will
not be rendered.

We are now shipping 3 different layouts you can choose from that will
change the look of how the metadata will be displayed.

Simple:
Is a compact version, showing icon and value in one line.

Condensed:
In addition to the icon and value, there is now also a prefix visible.

Extended:
Prefix and value are now in separate lines.

You will find settings for this in the constant editor.
Example Configuration for the postheader position:

plugin.tx_blog.settings.meta.postheader {
    enable = 1
    modifier = simple
    elements {
        authors {
            enable = 0
        }
        categories {
            enable = 0
        }
        tags {
            enable = 1
        }
        published {
            enable = 1
            format = %d.%m.%Y
        }
        comments {
            enable = 1
        }
    }
}

Templates added:

  • Partials/Meta/Default.html
  • Partials/Meta/Elements/Authors.html
  • Partials/Meta/Elements/Categories.html
  • Partials/Meta/Elements/Comments.html
  • Partials/Meta/Elements/Published.html
  • Partials/Meta/Elements/Tags.html
  • Partials/Meta/ListFooter.html
  • Partials/Meta/ListHeader.html
  • Partials/Meta/PostFooter.html
  • Partials/Meta/PostHeader.html
  • Partials/Meta/Rendering/Group.html
  • Partials/Meta/Rendering/Item.html
  • Partials/Meta/Rendering/Section.html
  • Templates/Post/Footer.html
  • Templates/Post/Header.html

Templates changed:

  • Partials/General/BlogIcons.html
  • Partials/List/Post.html
  • Templates/Post/Metadata.html

Releases: master
Fixes: #19

@benjaminkott benjaminkott changed the title [WIP] Refactor Metadata [!!!][FEATURE] Modernize metadata rendering Jun 26, 2019
@benjaminkott benjaminkott marked this pull request as ready for review June 26, 2019 22:00
@benjaminkott benjaminkott merged commit 28ef430 into master Jun 28, 2019
@benjaminkott benjaminkott deleted the feature/refactor-metadata branch June 28, 2019 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove comments from meta info if comments are disabled
1 participant