4 incorporated links from comments
source | link

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf? html.html.twig

But found this:

<head-placeholder token="{{ placeholder_token|raw }}">

I was able to track downHere is the related issueschange record:  

And some related issues:

And the change recorddocumentation:

But nothing really clarifies why this was done.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

I was able to track down the related issues:  

And the change record:

But nothing really clarifies why this was done.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig

But found this:

<head-placeholder token="{{ placeholder_token|raw }}">

Here is the change record:

And some related issues:

And the documentation:

But nothing really clarifies why this was done.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

3 added link to change record
source | link

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

I was able to track down the related issues:

And the change record:

But nothing really clarifies what is going on herewhy this was done.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

I was able to track down the related issues:

But nothing really clarifies what is going on here.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

I was able to track down the related issues:

And the change record:

But nothing really clarifies why this was done.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

2 Updated the question for brevity and clarity.
source | link

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

What the heck is this?

I mean, I was able to track down the related issues:

https://www.drupal.org/node/2565675 https://www.drupal.org/node/2538950

And a follow up issue:

https://www.drupal.org/node/2603074

But nothing really clarifies what is going on here, why this strange syntax (that at first glance makes very little sense, in the context of what twig does).  

Is there some advanced functionality of Twig that is being leveraged here, or is this just anothera Drupalism? IfA Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the lattergenerated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why cant we justwhy does Drupal core need to do something like {{ head }} or eventhis? {{ tokens.head }} or use a Twig block or something which would read much more clearly(The CTools system was ostensibly to get around some core limitations).

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

What the heck is this?

I mean, I was able to track down the related issues:

https://www.drupal.org/node/2565675 https://www.drupal.org/node/2538950

And a follow up issue:

https://www.drupal.org/node/2603074

But nothing really clarifies what is going on here, why this strange syntax (that at first glance makes very little sense, in the context of what twig does).  

Is there some advanced functionality of Twig that is being leveraged here, or is this just another Drupalism? If the latter, why cant we just do something like {{ head }} or even {{ tokens.head }} or use a Twig block or something which would read much more clearly.

Started to dive into Drupal 8 twig, and what better place to start than from the top: html.html.twig, except.... wait, wtf?

<head-placeholder token="{{ placeholder_token|raw }}">

I was able to track down the related issues:

But nothing really clarifies what is going on here.

Is this a Drupalism? A Twigism? What are these tokens for?

The only other time I've seen a placeholder token system like this was with CTools where they create a placeholder in the generated HTML output and then go back later and replace the token with the actual value. If this is the same concept, why does Drupal core need to do this? (The CTools system was ostensibly to get around some core limitations).

1
source | link