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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:17:17+00:00 2026-05-28T01:17:17+00:00

I am using a ‘skins’ approach to loading css into my Zend Framework site.

  • 0

I am using a ‘skins’ approach to loading css into my Zend Framework site.

From layout.phtml:

  <head>
  <?php 
    print $this->headTitle();
    print $this->headScript();
    $this->loadSkin($this->skin);
    print $this->headLink();
    print $this->jQuery();
    print $this->layout()->customJS;
  ?>
</head>

where loadSkin() is a view helper that looks like this:

class Zend_View_Helper_LoadSkin extends Zend_View_Helper_Abstract {
  public function loadSkin ($skin) {
    $skinData = new Zend_Config_Xml('./skins/' . $skin . '/skin.xml');
    $stylesheets = $skinData->stylesheets->stylesheet->toArray();
    if (is_array($stylesheets)) {
      foreach ($stylesheets as $stylesheet) {
        $this->view->headLink()->appendStylesheet('$skin.'/css/'.$stylesheet);
      } 
    } 
  } 
}

Everything shows up fine in the browser (any graphical browser), including jQueryUI elements, like here: https://i.stack.imgur.com/70PVl.png.

But when I print, the css is completely ignored, like here:
https://i.stack.imgur.com/NGC25.png.

I am completely stumped – and can’t find anything here or on ZF forums about giving separate css parameters for printing. Any pointers would be greatly appreciated!

Thanks in advance,
-Roman

  • 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-05-28T01:17:18+00:00Added an answer on May 28, 2026 at 1:17 am

    Iam not sure, but i think you have to set the MediaType for the CSS File:

    //Display + Print
    ->appendStylesheet($skin.'/css/'.$stylesheet, 'screen,print');
    
    //Only for Printers
    ->appendStylesheet($skin.'/css/'.$stylesheet, 'print');
    

    View the following link for more information about the View-Helper for Stylesheets http://framework.zend.com/manual/de/zend.view.helpers.html#zend.view.helpers.initial.headlink

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

Sidebar

Related Questions

Using mercurial, I've run into an odd problem where a line from one committer
Using NLTK and WordNet , how do I convert simple tense verb into its
Using jQuery, how do I get the value from a textbox and then load
Using Entity Framework CodeFirst, how do I create a created datetime column that gets
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
Using Visual C++ 2008. First time, I'm experimenting in crossing over from C# and
Using JAXB in Java it is easy to generate from a xml schema file
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
(Using MVC 2) From inside my controller action, I need to display the url:
Using online interfaces to a version control system is a nice way to have

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.