Problem/Motivation

Consider extending Drupal.theme allow templating with Twig as well.

Reason for including this would be so that you possibly re-use templates that are being produced on the front-end and have a consistent templating syntax. Also having twig functions could be great too;)

Proposed resolution

Add https://github.com/justjohn/twig.js/

Remaining tasks

  1. Add the Twig JS library to core.
  2. Integrate somehow into theme functions.

API changes

Additional templating to mirror the backend templates.

Comments

joelpittet created an issue. See original summary.

nod_’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs issue summary update

The issue summary needs an argumented "why". If more details could be added about: "Integrate somehow into theme functions" that'd be great too.

What about all the drupal specific twig functions we added? how that'd works with something like twigjs, do they have an api to extend what it does?

joelpittet’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Postponed
Issue tags: -Needs issue summary update

Not sure if the JS version has the ability to extend or if JS has the ability to use such features.

The reason I brought this up was I saw people implementing Drupal.theme.whatever and it seemed like it would be handy to template consistently. Won't be in 8.0.x but maybe something to revisit once the branch opens.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Status: Postponed » Active

This may be something for Ideas queue... not sure, opening to see if others are interested

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.