skip to Main Content

I created a custom distribution based on twitter bootstrap for typo3 version 7.6. Everything is working fine. Except the constants settings for using the news extension do not get recognized or get overwritten.

The only way I got it working is saving the declaration right into the template contants field in typo3 backend.

plugin.tx_news {
    view.twb {
            templateRootPath = EXT:bootdist/news/Private/Templates/Styles/Twb/Templates
            partialRootPath = EXT:bootdist/news/Private/Templates/Styles/Twb/Partials/
            layoutRootPath = EXT:bootdist/news/Private/Templates/Styles/Twb/Layouts/
    }
}

No matter what I include into my constants.txt of the distribution is ignored by the news extension.
The order of the included static templates in my root template is like so:

  • News (news)
  • Bootstrap Distribution (bootdist) //my Distro
  • News Styles Twitter Bootstrap(news)

When I include my distro as latest then the news extension has already all template paths set and overwriting from the distro dont seem to work. Only when I change paths for extension in backend itself everything works.

But I want to set all configuration through my distro without having to fix something in the root template in backend.

Is there a way to get this done ?

2

Answers


  1. I’m not very handy with typo3 yet, but I give it one shot …
    I think tx_news declares other variables, maybe this works:

    plugin.tx_news {
        view.twb {
                templateRootPaths = EXT:bootdist/news/Private/Templates/Styles/Twb/Templates/
                partialRootPaths = EXT:bootdist/news/Private/Templates/Styles/Twb/Partials/
                layoutRootPaths = EXT:bootdist/news/Private/Templates/Styles/Twb/Layouts/
        }
    }
    

    sometimes the trouble is that simple …
    otherwise you should actually declare your templates within the constants of your news extension,

    Login or Signup to reply.
  2. I guess you have seen the manual at https://docs.typo3.org/typo3cms/extensions/news/AdministratorManual/Templates/TwitterBootstrap/Index.html about twitter bootstrap.

    The order should be:

    1. News
    2. News TWB
    3. Your sitepackage extension

    In your site package extension in the constants you can override the constants

    plugin.tx_news {
        view.twb {
            # cat=plugin.tx_news/file; type=string; label=Path to template root (FE)
            templateRootPath = EXT:news/Resources/Private/Templates/Styles/Twb/Templates
            # cat=plugin.tx_news/file; type=string; label=Path to template partials (FE)
            partialRootPath = EXT:news/Resources/Private/Templates/Styles/Twb/Partials/
            # cat=plugin.tx_news/file; type=string; label=Path to template layouts (FE)
            layoutRootPath = EXT:news/Resources/Private/Templates/Styles/Twb/Layouts/
        }
    }
    

    Use the TypoScript Objectbrowser to check the constants and/or the setup where the constants are used

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search