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] By default generate classes for body tag for nuxt-typo3 #803

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

twoldanski
Copy link
Collaborator

  • By default generate pid-[PageID] class & layout-[layout-name] for body tag

  • TYPO3 dev can expand default classes via page.bodyTagAdd (attributes, are merged, class attribute is also merged by default), so if dev adds custom class via page.bodyTagAdd result will be for example class="pid-1 layout-layout-0 custom-class".

If BE wants to completely overwrite values of body attributes it should communicate it via config.headless.overwriteBodyTag = 1. Flag changes behaviour by overwriting default values by values of page.bodyTagAdd

@coveralls
Copy link

coveralls commented Jan 24, 2025

Pull Request Test Coverage Report for Build 13432181368

Details

  • 14 of 15 (93.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 73.13%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/Seo/MetaHandler.php 14 15 93.33%
Totals Coverage Status
Change from base Build 13009480101: 0.2%
Covered Lines: 1105
Relevant Lines: 1511

💛 - Coveralls

@twoldanski twoldanski force-pushed the feat/default-body-attr branch from a6cf34b to 5337ffe Compare January 24, 2025 11:39
- By default generate pid-[PageID] class & layout-[layout-name] for body tag

- TYPO3 dev can expand default classes via `page.bodyTagAdd` (attributes, are merged, class attribute is also merged by default), so if dev adds custom class via `page.bodyTagAdd` result will be for example `class="pid-1 layout-layout-0 custom-class"`.

 If BE wants to completely overwrite values of body attributes it should communicate it via `config.headless.overwriteBodyTag = 1`. Flag changes behaviour by overwriting default values by values of `page.bodyTagAdd`
@lukaszuznanski lukaszuznanski merged commit a15e1c8 into master Feb 21, 2025
11 checks passed
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.

3 participants