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 7735489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:30:52+00:00 2026-06-01T07:30:52+00:00

I am working on integrating Assetic into an application that I am building. The

  • 0

I am working on integrating Assetic into an application that I am building. The application follows the MVC pattern but does not use any frameworks. Twig is used for templating.

I have read the documentation and have looked at a few helpful blog posts.

The application is structured like this:

  • application
    • twig_templates
    • js
    • css
  • public_html
    • js
    • css
    • images

The twig templates are rendered and then returned by the application, so that is quite straight forward. The js and css folders underneath the application folder would hold the raw javascript and css files.

My plan is that combined and minified js and css files would be stored in the js and css folders under the public_html folder.

Since I don’t plan to optimize any images using assetic, they will be placed in the images folder underneath public_html directly.

Now the question:

  • I understand that by using assetic from twig, combined and minified assets can be exported to my public_html directories:

    {% stylesheets '/path/to/sass/main.sass' filter='sass,?yui_css' output='css/all.css' %}
        <link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
    {% endstylesheets %}
    

    In this case is the css/all.css file regenerated everytime that template is rendered?

  • To make the application portable (it could be hosted using a virtual host, or perhaps even in a folder) and to ensure things work in a site with routed URLs like http://site.com/controller/action, does assetic provide anyway “rewrite” URLs for images into absolute ones (i.e. images/a.jpg into http://mysite.com/images/a.jpg)?

  • Does assetic work when using nested templates?

    parent.twig:

    <!DOCTYPE html>
    <html>
        <head>
            {% block head %}
                <link rel="stylesheet" href="mainstyle.css" />
                <title>{% block title %}{% endblock %} - My Webpage</title>
            {% endblock %}
        </head>
        <body>
        </body>
    </html>
    

    child.twig:

    {% extends "parent.twig" %}
    
    {% block title %}Index{% endblock %}
    {% block head %}
        {{ parent() }}
        <link rel="stylesheet" href="childstyle.css" />
    {% endblock %}
    

    In this case, how can I let assetic know that it should combine childstyle.css and mainstyle.css and serve it as 1 file?

  • 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-01T07:30:53+00:00Added an answer on June 1, 2026 at 7:30 am

    as for this answer it is not possible to combine inherited stylesheets from parent with child’s
    Combining Assetic Resources across inherited templates

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

Sidebar

Related Questions

I'm working on integrating a single-threaded API that does not have any multi-threaded support
I am working on integrating scapy with twisted, but I ran into this very
I am working on integrating the social network vkontakte into my desktop application using
Im integrating local notification into my app. It is working fine. But client want
I'm working with the ASP.Net MVC 3 framework and I'm integrating dependency injection into
I am working on an application integrating wepay's delayed payment functionality into it. While
I am working on integrating Amazon FPS into my company's website but seem to
I'm working on integrating AngularJs into an example Nodejs application. My controller is as
I am working on a C program that I did not write and integrating
I have created a facebook application for integrating facebook credits.It is working fine but

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.