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

N°7995 - Allow to redefine portal twig template for all bricks in a portal #686

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

steffunky
Copy link
Member

Base information

Question Answer
Related to a SourceForge thead / Another PR / Combodo ticket? N°7995
Type of change? Enhancement

Objective

When redefining a brick template, you need to overload the <template> for every brick definition.
It works well for one specific iTop, but as we plan to release an extension bringing the 3.3.0 portal design compatible with iTop 3.2.1+, we need to be able to overload templates for all bricks in a portal without overloading every brick definition

Proposed solution

This pull request use the <template> defined in the portal properties, allowing it to define new default templates that bricks will take into account if they do not have a specific template in their definition.

Example of a customization that'll affect every BrowseBrick in a portal:

  <module_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="itop-portal" xsi:type="portal">
  <properties>
    <templates>
      <template id="Combodo\iTop\Portal\Brick\BrowseBrick:page" xsi:type="Combodo\iTop\Portal\Brick\BrowseBrick" _delta="define">itop-custom-browse-brick/templates/page.html.twig</template>
    </templates>
  </properties>
  </module_design>

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand digging in the code?

@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Nov 28, 2024
@steffunky steffunky added this to the 3.2.1 milestone Nov 28, 2024
@bdalsass bdalsass self-requested a review November 29, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Work made by Combodo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants