We're updating the issue view to help you get more done. 

Add theme path global variable and use it to include base views in Thompson / default theme, using the template locator

Description

Background

When a theme base view override is made from the Thompson / default or theme, the original base view is used in all content item templates. This should be done dynamic by getting the path from the template locator.

Requirements

Support including the base view of the current theme, instead of a hardcoded bundle.

Development plan

We would like to combine the namespaced twig paths with a "helper" that gives us the active path:

1 {% extends integrated_active_theme("layout.html.twig") %}

In this case integrated_active_theme returns a namespaced path, for example:

1 @ci_thompson/layout.html.twig

Things that needs to be changed:
1. Config.yml needs the namespaces, example:

1 2 3 4 5 6 7 8 9 10 twig: # ... paths: '%kernel.project_dir%/vendor/acme/themes/ci_thompson': ci_thompson '%kernel.project_dir%/vendor/acme/themes/thompson': ci_thompson '%kernel.project_dir%/vendor/acme/themes/common': ci_thompson '%kernel.project_dir%/vendor/acme/themes/thompson': thompson '%kernel.project_dir%/vendor/acme/themes/common': thompson

2. Layout/block selector in Integrated needs to look at the namespaces and return the views that can be found.
3. The themes needs to be changed (but this should also be done in the other solutions).
4. The theme manager (perhaps the whole ThemeBundle) can be "deleted" with the recursive path "shizzle".

Deployment actions

DEPRECATED:

  • _theme global -> integrated_active_theme()

Technical tasks

None

Status

Assignee

Unassigned

Reporter

Marijn Otte

Product owner

Maartje Wessels-Wouda

OTM project ID

None

Client

Integrated Marijn

Plan date

None

Developer

Ger Jan van den Bosch

Code reviewer

Jeroen van Leeuwen

Max. hours

None

Error message

None

Follow up date

None

Switches

None

Refiner

None

Story Points

3

Time tracking

11h 30m

Epic Link

Sprint

None

Fix versions

Priority

Major