Skip to content

New design/layout for page_title block for all twig files#22

Open
OStefan2001 wants to merge 2 commits into
developfrom
stefan-dev
Open

New design/layout for page_title block for all twig files#22
OStefan2001 wants to merge 2 commits into
developfrom
stefan-dev

Conversation

@OStefan2001

Copy link
Copy Markdown
Collaborator

No description provided.

@OStefan2001
OStefan2001 requested a review from alexmerlin July 24, 2026 09:59

@alexmerlin alexmerlin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than those repeating elements in each template (that could be moved to a different template and each file would extend that new template), nothing to complain.

@OStefan2001

Copy link
Copy Markdown
Collaborator Author

I will change that

@OStefan2001

Copy link
Copy Markdown
Collaborator Author

is this way okay ? and in title-section partial conditions if data exists to display that div
{% block page_title %}
{{
include('@partial/title-section.html.twig', {
back_href: url('page::blog'),
back_label: 'Back to Blog',
badge: 'Headless Platform',
title: article.title,
author_name: article.author.name,
author_slug: article.author.slug,
post_date: article.postDate
})
}}
{% endblock %}

@OStefan2001
OStefan2001 requested a review from alexmerlin July 24, 2026 11:37
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.12%. Comparing base (c197596) to head (13b8b4f).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #22   +/-   ##
==========================================
  Coverage      21.12%   21.12%           
  Complexity       195      195           
==========================================
  Files             45       45           
  Lines            871      871           
==========================================
  Hits             184      184           
  Misses           687      687           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexmerlin

Copy link
Copy Markdown
Member

is this way okay ? and in title-section partial conditions if data exists to display that div {% block page_title %} {{ include('@partial/title-section.html.twig', { back_href: url('page::blog'), back_label: 'Back to Blog', badge: 'Headless Platform', title: article.title, author_name: article.author.name, author_slug: article.author.slug, post_date: article.postDate }) }} {% endblock %}

It is ok.
You could also shorten it by passing the entire article to the title-section template:

{% block page_title %}
{{
    include('@partial/title-section.html.twig', {
        back_href: url('page::blog'),
        back_label: 'Back to Blog',
        badge: 'Headless Platform',
        article: article,
    })
}}
{% endblock %}

Then, in title-section you pick from article the properties you need to display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants