On the Theme System Overview topic:
https://api.drupal.org/api/drupal/core!modules!system!theme.api.php/grou...

We need a new section added that explains the basics of Twig. It needs to:

- Tell what Twig is
- Link to the docs on how to do D8 theming: https://www.drupal.org/theme-guide/8
- Link to http://twig.sensiolabs.org/doc/templates.html

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

astrocling’s picture

Assigned: Unassigned » astrocling

I think I would like to take a stab at this. I am going to assign it to myself and get working on it this week.

astrocling’s picture

Assigned: astrocling » Unassigned
Status: Active » Needs review
FileSize
1.46 KB

So here is an attempt on this. I wanted to be concise and just provide a brief overview of Twig as well as providing the links.

I am not sure that more is necessary, but I am can rework this if necessary.

star-szr’s picture

Thank you @astrocling, at a glance the only thing that jumped out at me so far was:

+++ b/core/modules/system/theme.api.php
@@ -18,6 +18,19 @@
+ * For further TWIG documentation see:

s/TWIG/Twig/

jhodgdon’s picture

Status: Needs review » Needs work

Agreed with #3. Also:

+ * For further information on theming in Drupal 8 see:
+ * - @link https://www.drupal.org/theme-guide/8 @endlink
+ *
+ * For further TWIG documentation see:
+ * - @link http://twig.sensiolabs.org/doc/templates.html @endlink

Since these are both one-item lists... they shouldn't really be lists. Just leave out the : and - and we'll be good there.

The rest looks fine to me -- quick repatch?

astrocling’s picture

Ok good notes, I missed that capitalization thing. I hadn't considered the list issue jhodgdon. I will repatch it after lunch and post.

Question though, should I leave out the - prior to the links as well because it is not technically a list, or are those appropriate? I tried to follow as much as I could standards wise, just want to make sure I am not forming bad habits.

jhodgdon’s picture

Yes, leave out the - so it is not a list.

astrocling’s picture

Status: Needs work » Needs review
FileSize
1.46 KB

Alright lets try this one with the edits as we discussed.

jhodgdon’s picture

Status: Needs review » Needs work

Great! So, sorry, I missed this the first go-around:

If you're including a URL without link text, you should leave out the @link / @endlink tags. They are only needed if you want to make a link with specific link text.

astrocling’s picture

Assigned: Unassigned » astrocling

Ok no problem, I can do that. Thanks for the heads up, I didn't know I was misusing the @link tag.

astrocling’s picture

Assigned: astrocling » Unassigned
Status: Needs work » Needs review
FileSize
1.43 KB

Here it is with the @links removed. Let me know if there is anything else. Thanks for looking at it.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks great, thanks!

astrocling’s picture

You're welcome, thanks for reviewing it.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed ea83349 and pushed to 8.0.x. Thanks!

  • alexpott committed ea83349 on 8.0.x
    Issue #2326093 by astrocling | jhodgdon: Need new section about Twig...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

batigolix’s picture

Issue tags: +sprint
batigolix’s picture

Issue tags: -sprint

oops :( sorry for that