convert ./core/themes/bartik/templates/comment.tpl.php to a twig file

Comments

pixelmord’s picture

Project: Drupal core »
Version: 8.x-dev »
Component: theme system » Code
Assigned: Unassigned » pixelmord

There is a first version of a twig template in the sprint sandbox in the stark theme. It was taken from chx sandbox bartik theme.

We need to improve it, since it's still using render functions

steveoliver’s picture

Component: Code » Twig templates
Status: Active » Needs review
StatusFileSize
new21.02 KB

With these .twig files in Bartik now, it's messing up development/testing... let's remove them until Stark is done. Patch attached.

fabianx’s picture

Assigned: pixelmord » psynaptic
Status: Needs review » Reviewed & tested by the community

Please commit the patch.

psynaptic’s picture

Status: Reviewed & tested by the community » Needs work
steveoliver’s picture

Status: Needs work » Postponed

Postponed?

fabianx’s picture

Status: Postponed » Fixed

Fixed

fabianx’s picture

Status: Fixed » Postponed

right, that is rather postponed for now ...

c4rl’s picture

Component: Twig templates » Twig templates conversion (front-end branch)
Status: Postponed » Active

This is probably okay to get started, changing status to active.

sonictruth’s picture

StatusFileSize
new9.69 KB

Here's a patch to remove comment.html.php and replacing with comment.html.twig

I haven't touched comment-wrapper yet.

tayzlor’s picture

StatusFileSize
new13.12 KB

Heres a patch that includes comment + comment wrapper templates for Bartik. Fairly new to twig so hope i'm going in the right direction...

tayzlor’s picture

Status: Active » Needs review
sonictruth’s picture

Umm...is there a reason you posted this patch when patches for both comment and comment wrapper already existed? Was there a problem with them? Comment wrapper issue is here: http://drupal.org/node/1843578

fabianx’s picture

#12: I think it was a duplicate, but I don't think its a huge problem.

We'll just compare both patches and commit a merge of them ;-).

jenlampton’s picture

Status: Needs review » Postponed

I think we should hold off on all the templates for Bartik and Seven until we decide the core templates are done (Reworked to use theme component library). If we create all the "overrides" before we decide what we're overriding, we may end up just creating more work for ourselves.

(We may change our mind about this at some point and decide to edit all 3 versions with each change, but I think it's too early to do that now)

thedavidmeister’s picture

The bartik tpl.php files cause the testbots to fail for the comment module as the new preprocess functions are incompatible with them - see the failed tests in comment #4 of #1898054: comment.module - Convert PHPTemplate templates to Twig.

Since the converted tpl.php files from Bartik would be identical to the core template files and there is nothing being "overridden" per-se by bartik I removed the Bartik templates altogether in my patch there.

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)