Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8041417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:12:47+00:00 2026-06-05T04:12:47+00:00

Is it possible to include an entire folder with the Twig included in Symfony2?

  • 0

Is it possible to include an entire folder with the Twig included in Symfony2?

Basically, I’d like to be able to separate my Javascript objects into their own folder for increased readability, but then be able to include all of those back in to one file to present to the client.

Any ideas?

Thanks.

EDIT: I technically mean with Assetic, using the javascripts and stylesheets tags.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:12:49+00:00Added an answer on June 5, 2026 at 4:12 am

    Do you mean to have the {% stylesheets %} and {% javascripts %} code in separate twig templates? Or just to have the js/css files in separate directories?

    If you mean the latter, then that’s the standard use of Assetic. The example case in the docs describes exactly that.

    http://symfony.com/doc/current/cookbook/assetic/asset_management.html

    Note that while in the dev environment they will still be separated. In the prod environment they are combined. (This is configurable in app/config/config.yml)

    If you are looking to have the {% stylesheets %} and {% javascripts %} tags in separate twig template but have them compile to a single JS/CSS file, this is not currently possible. But I believe they are working on this ability with the next major release.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: get name of current PHP script in include file Can an included
Is it possible to INCLUDE other mysql scripts in a composite script? Ideally I
Is it possible to include view code in a plugin, such that an app
Is it possible to include an alphabetic character in a SimpleDateFormat Pattern String? I
Is it possible to include custom data files in ClickOnce deployment? I couldn't find
Is it possible to include a draw component (circle or rectangle) inside a grid
Does anyone know if it's possible to include a range in a switch statement
In Flex, is it possible to include some kind of MetaData to a property,
Possible Duplicate: Copy Constructor is not invoked # include <iostream> using namespace std; class
Possible Duplicate: Is it a good idea to wrap an #include in a namespace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.