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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:57:13+00:00 2026-06-11T17:57:13+00:00

I am running Express 3.0 with Jade template engine. I’m trying to pass a

  • 0

I am running Express 3.0 with Jade template engine. I’m trying to pass a variable from a template page to the main layout page. Like this:

layout.jade (snippet):

!!! 5
html(lang='en') 
    head 
        meta(charset='utf-8')
        title= locals.title

        - if (typeof(stylesheets) !== 'undefined')
            each stylesheet in stylesheets
                link(rel='stylesheet', href='/stylesheet/#{stylesheet}.css')

    body
        block body

landing.jade (snippet):

stylesheets = ["landing"]
extends layout

block body
    h1 Test 1234

The generated code does not include the extra stylesheet tag. I tried - var stylehseets... and renaming ‘stylesheets’ fearing it might be a keyword.

Any suggestions?

  • 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-11T17:57:15+00:00Added an answer on June 11, 2026 at 5:57 pm

    Use the block append feature for this. Straight from the docs is an example exactly like what you are trying to do.

    layout.jade


    html
      head
        block head
          link(rel='stylesheet', href='/css/layout.css')
        body
          block body
    

    landing.jade


    extends layout
    
    block append head
      link(rel='stylesheet', href='/css/landing.css')
    block body
      h1 Test 1234
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a node.js express server running with the Jade template engine. I've got
I'm running VS2010 Express with .NET 4.0 and trying to create a Master Page
Im trying to install express using npm, running this code: npm install express mongoose
I'm running SQL Server 2005 Express. And I'm trying to do a bulk insert/import
I'm learning C++ and I'm using Visual C++ Express and while running this #include
I am running windows 7 and I am trying to get this IDE to
I am trying to detect if the server is running Express Edition. I have
I need to write a script that disables SQL Server Express 2008 from running.
I'm trying to port a database from SQL Server Express over to my MySQL
I'm having trouble with a variable (config) declared in a jade template file (index.jade)

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.