Thank you all for your suggestions.  Regarding using the controller
action to render my css, it dawned on me to create a similar, but
different solution.  I figured why not create a class that writes a
dynamically generated file to the disk?  That way, I can take
advantage of the config.ini and any other framework toys I need.  I
thought I might include the class (its not rocket science, but I
thought if some of you thought this was useful enough, it might be
added to the framework as a tool):

class generateCSS
{

  private function createCode()
  {
    $config = Zend_Registry::get('config');
    $lgnbtn = $config->c_forms->site->input->submit;
    $header = $config->c_general->site->headers;

$css = <<<END
body
{
  margin: 0px;
  padding: 0px;
}

.login_submit_button
{
  margin: 0px 52px 0px 0px;
  color: $header;
  background: $lgnbtn; /* #6678C4; */
}
END;

  return $css;

  }


  public function generateCSS()
  {
    if (!file_exists('includes/style.css'))
    {
      $css = $this->createCode();

      exec("echo '$css' > includes/style.css");
      exec("chmod 777 includes/style.css");
    }
  }


}


On Mon, Oct 13, 2008 at 7:41 PM, David Mintz <[EMAIL PROTECTED]> wrote:
>
>
> On Sun, Oct 12, 2008 at 6:25 PM, Matthew Ishii <[EMAIL PROTECTED]>
> wrote:
>>
>> Any way to combine Zend_Config_Ini and CSS???
>>
>> On Fri, Oct 10, 2008 at 11:03 PM, Matthew Ishii <[EMAIL PROTECTED]>
>> wrote:
>> [...]
>> > Ive tried everything, I tried pulling the config out into a variable
>> > and then referencing that inside the CSS heredoc statement, no dice.
>> > I tried requiring the Registry lib file in case that was causing the
>> > issue, no dice.  Am I doing something wrong here, or does anyone else
>> > have a way they do this that is easier?
>> >
>
> http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.action
> might be useful if you want a controller action to render your CSS.
>
> On the other hand you might consider using Zend_Config_Ini as a standalone,
> outside of MVC. Require() the necessary files, load your config, emit the
> proper content-type header, and off you go.
>
> --
> David Mintz
> http://davidmintz.org/
>
> The subtle source is clear and bright
> The tributary streams flow through the darkness
>

Reply via email to