b13 / bolt

Easier integrations for TYPO3 sites
GNU General Public License v2.0
27 stars 13 forks source link

Question: How to use same sitepackage for multiple websites? #20

Closed typecat closed 2 years ago

typecat commented 2 years ago

I very much would love to use this extension in a huge project with multiple websites. The particular use case is, that they all share the same sitepackage, because it's only a few site tree specific overrides (like TypoScript constants or PAGE_TSCONFIG_ID) per package. So far I stored those overrides in a specific sub-folder inside the sitepackage and included the file in the TypoScript Template Object record, e.g. <INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_sitepackage/Configuration/TypoScript/sites/website-a/constants.typoscript">

Unfortunately, the paths where bolt looks for configuration are fixed. So here's my question:

Is it possible to make them adjustable? Or, what would be a better way to handle this (except having a sitepackage per site tree, because I don't see a benefit in having 20 site packages with only some constant overrides inside)?

bmack commented 2 years ago

Hey @typecat ,

I recently experienced the same topic in a v11 project. What I did:

  1. Used the main site configuration with the defaults in all site configuration yaml files. e.g. "sitePackage: my_base_site".
  2. Moved all differences between each page trees to site settings, In the site configuration via "settings.pages.search = 123". These are then available as constants and in PageTS conditions in all sites, or "settings.enableNews = true" so the site package was not aware of any page IDs or any other special options.

But this depends on the use-case.

In some projects, I do have a site package per pagetree, where the site packages only extend the "my_base_site" TypoScript (via "@import") and only override the values needed.

achimfritz commented 2 years ago

Hi @typecat use one site-package and use site-settings instead of TypoScript Constants (can also be used in PageTs), s. https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/SiteSettings.html

typecat commented 2 years ago

Thanks @bmack, I wasn't aware of the site settings - great!

Unfortunately now I'm stuck with a different issue: I'm using the lib.dynamicContent of EXT:bootstrap_package (but not the extension itself) to render a column's content elements. The HTML of RTE formatted text fields (e.g. CType text) is rendered as a string, which results in the markup being displayed in the frontend.

I checked:

The setup works perfectly without bolt. Do you have an idea what I might be doing wrong?

typecat commented 2 years ago

I found the problem, it was in my includes structure. The setup works fine now! Sorry for bothering >.<