Skip to content

Reworded all the docs related to templates and Twig #12274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

javiereguiluz
Copy link
Member

As we did in the past with other topics, this pull request revamps the templating/templates/twig docs. The main goals were:

  • Create a single article /templates.rst that explain everything about templates.
  • Keep some templating/*.rst articles for uncommon things (PHP, Twig extensions, hinclude, etc.)
  • Remove all the small templating/*.rst articles.
  • Simplify all explanations and reduce verbosity.
  • Add more cross-links between articles.

The TOC of the new article looks like this:

Twig Templating Language
    Twig Configuration
Creating Templates
    Template Naming
    Template Location
    Template Variables
    Linking to Other Pages
    Linking to CSS and JavaScript Assets
    The App Global Variable
Rendering Templates
    Rendering Templates in Routes
    Rendering Templates in Controllers
    Rendering Templates in Services
    Rendering Templates in Emails
    Checking if a Template Exists
Debugging Templates
    Linting Twig Templates
    Inspecting Twig Information
    The Dump Twig Utilities
Reusing Template Contents
    Including Templates
    Embedding Controllers
    Template Inheritance and Layouts
Output Escaping
Template Namespaces
Learn More

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review! I love getting a fresh look at these docs :)

@OskarStark
Copy link
Contributor

Could you please fix the issues spotted by the doc ? 😁

javiereguiluz added a commit that referenced this pull request Sep 11, 2019
…iereguiluz)

This PR was squashed before being merged into the 4.3 branch (closes #12274).

Discussion
----------

Reworded all the docs related to templates and Twig

As we did in the past with other topics, this pull request revamps the templating/templates/twig docs. The main goals were:

* Create a single article `/templates.rst` that explain everything about templates.
* Keep some `templating/*.rst` articles for uncommon things (PHP, Twig extensions, hinclude, etc.)
* Remove all the small `templating/*.rst` articles.
* Simplify all explanations and reduce verbosity.
* Add more cross-links between articles.

-----

The TOC of the new article looks like this:

```
Twig Templating Language
    Twig Configuration
Creating Templates
    Template Naming
    Template Location
    Template Variables
    Linking to Other Pages
    Linking to CSS and JavaScript Assets
    The App Global Variable
Rendering Templates
    Rendering Templates in Routes
    Rendering Templates in Controllers
    Rendering Templates in Services
    Rendering Templates in Emails
    Checking if a Template Exists
Debugging Templates
    Linting Twig Templates
    Inspecting Twig Information
    The Dump Twig Utilities
Reusing Template Contents
    Including Templates
    Embedding Controllers
    Template Inheritance and Layouts
Output Escaping
Template Namespaces
Learn More
```

Commits
-------

ec618e1 Reworded all the docs related to templates and Twig
@javiereguiluz javiereguiluz merged commit ec618e1 into symfony:4.3 Sep 11, 2019
@javiereguiluz javiereguiluz deleted the revamp_templating branch September 11, 2019 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants