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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:14:22+00:00 2026-06-18T20:14:22+00:00

I am looking to extend a stylesheet list in twig. I have stripped down

  • 0

I am looking to extend a stylesheet list in twig. I have stripped down the code as much as possible to illustrate what im trying to achieve.

base.html.twig

<!DOCTYPE html>
<html>
  <head>
    <title>Some title</title>

    {% block stylesheets %}
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
    <link href="css/custom-theme/jquery-ui-1.10.0.custom.css" rel="stylesheet" media="screen">
    {% endblock %}

  </head>

  <body>
    {% block content %}
        .. content for body goes here etc
    {% endblock content %}

  </body>

<!-- rest of template --!>

I then reuse the base template but I dont want to relist all of the style sheets I just want to add one on the end of the list?

template that uses base

{% extends 'sjQueryBundle::base.html.twig' %}

{% block stylesheets %}
<link href="css/sales-journal.css" rel="stylesheet" media="screen">
{% endblock %}

{% block content %}
  some template stuff here
{% endblock content %}

The problem with the above is it replaces the style-sheet block entirely I’m just looking to add sales-journal.css onto the end?

  • 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-18T20:14:23+00:00Added an answer on June 18, 2026 at 8:14 pm

    All you need is to call parent() method, which will render contents of the parent block

    {% block stylesheets %}
        {{ parent() }}
        <link href="css/sales-journal.css" rel="stylesheet" media="screen">
    {% endblock %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking at the Ehcahce implementation of net.sf.cache.JS107, I am trying to achieve the following
I'm looking to extend the regex below so I can have unlimited number of
I am looking to have a logo extend into a black bar that will
I'm looking for examples of why it's not a good idea to extend base
I'm looking for a way to make the last inline list item extend the
I have an <asp:ListItem> control and I am looking to extend this to have
I'm looking for a way to extend a TextField that's allready on the stage
Greetings, I'm looking for a way to extend the functionality of the HTMLEditor control
I am looking at an example which code is: class SimpleThread extends Thread {
Looking at some assembly code for x86_64 on my Mac, I see the following

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.