smarty-php / smarty-php/smarty

Smarty Block will be overwritten or the following templates will be ignored

Open
#869 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
2.3k
Forks
709
PR merge metrics
No merged PRs in 30d

Description

Hello guys, I have a question. Maybe someone can help me.

I am currently using Smarty with PHP 8.0, have a default template, a custom template and several addon templates which are also made up of template files and should be inherited/extended in that order.

If I now extend a block from the default template with a block from the custom template, I can no longer access the same block with an addon template. Apparently the first loaded block is always used, which extends the block from the default. Anything after that that extends the same block is ignored. Even if I use {parent}|{child} .
What am I doing wrong?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reproducing the inheritance setup with Smarty on PHP 8.0, using default, custom, and addon templates. Done means determining whether multiple extensions of the same block are supported and documenting or fixing the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.