benjaminkott / benjaminkott/bootstrap_package
Best way to re-use content elements in a custom frontend plugin
- Dominant language
- PHP
- Stars
- 355
- Forks
- 212
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 31
Description
# Support
## Description
I am currently implementing a custom frontend plugin which should render a detail view of a custom content type. The idea is to allow the editor to put in the data in more structured way instead of having to build a page "by convention" for this type of data.
However, I was wondering if there is a clean way to re-use the content elements from bootstrap package for rendering, so I don't have to rebuild the templates / partials from scratch (making the app harder to maintain in the future).
So far I had the following ideas:
1. Just connect my custom data model to `tt_content` and allow the editor to configure the data there (i.e. stage, gallery, quote,...). Would work, but goes against the idea of having the data neatly in their own tables. (I.e. this is basically the way the`News` extension works)
2. Have a custom template that renders the bootstrap package content element templates. Hardcode data like `frame_type` etc. to get the same look. A) I am not sure if this is possible in Typo3, since CEs are templates not partials? B) It would required quite a bit of work pass the required data structure to the templates.
3. Just build custom templates / partials. These could either re-use some of the classes from bootstrap package to get the existing styling for free or simple re-build from scratch. This would effectly negate some of the benefits we have from using bootstrap-package and would need to be maintainend separately.
Any clues or links to existing documention would be very much appreciated :)
Cheers,
Lukas
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the three approaches in the issue against the Bootstrap Package and TYPO3 documentation, especially how content-element templates can be reused by a custom frontend plugin. Confirm whether an existing supported pattern is documented; done means a concrete, maintainable reuse path is identified, or the recommended custom-template approach is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, php
- Domain
- documentation, frontend
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100