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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:13:04+00:00 2026-06-09T07:13:04+00:00

I started using Zend Framework and tried to add some stylesheets and javascript files

  • 0

I started using Zend Framework and tried to add some stylesheets and javascript files like this in my layout.phtml:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LoremIpsum</title>
<?php echo $this->headLink()->appendStylesheet('css/global.css'); ?>
</head>

The problem with this is, that it is only working if there is no action specified in the url.
For example it works with this:
http://www.domain.com, http://www.domain.com/index, http://www.domain.com/login

but if I add the action, even if it is
http://www.domain.com/index/index
it stops working.

I noticed that in this case the index.php is called twice and calls the ErrorController.
But the output shows no error. It is the expected output just without the stylesheet information.

Any ideas what is wrong with my layout?

Edit 1:

Error Reporting is activated and works in other cases.
HTML markup is correct.
Firebug show that my css file wasn’t found, but the path can’t be wrong because without specified action it works correctly.

  • 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-09T07:13:07+00:00Added an answer on June 9, 2026 at 7:13 am

    You can use the BaseUrl() View helper:

    <?php echo $this->headLink()->appendStylesheet($this->baseUrl().'/css/global.css'); ?>
    

    Then it should be fine…

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

Sidebar

Related Questions

Though this thread recommends using it, I've few concerns: I started with Zend Framework
I've started using Zend Framework and Studio for my projects and would like to
I've recently started using Zend Framework and I'm still pretty used to session_start, and
I started working on a project in the mid. We are using Zend Framework,
We started using Zend Java Bridge, but periodically run into errors like class not
I've recently started using Zend Framework (1.8.4), to provide admin tools for viewing the
I've started to document myself regarding Zend Framework as I will soon start using
I'm using the zend framework and have started setting up really easy urls. I'm
I have recently started using Zend Framework. I started developing on my local XAMPP
I started writing my first Zend Framework 2.0 (beta 1) PHP application using php

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.