-- barry hembree <[EMAIL PROTECTED]> wrote
(on Friday, 14 November 2008, 12:40 PM -0800):
> Matthew Weier O'Phinney-3 wrote:
> > 
> > -- barry hembree <[EMAIL PROTECTED]> wrote
> > (on Friday, 14 November 2008, 10:51 AM -0800):
> >> I installed the Pastebin demo using the VirtualHost scenario and
> >> everything
> >> worked fine. I then tried it out using an Alias Directive rather than a
> >> VirtualHost. The application works (after a fashion) but none of the Dojo
> >> or
> >> CSS is working. I tried several different ways to configure Dojo in the
> >> Initialize.php script but to no avail. Does anyone have an idea about
> >> what
> >> is going on here?
> > 
> > Yep. In the Initialize plugin, you'll see that I call setLocalPath() on
> > the dojo helper -- and pass it a path relative to the document root.
> > Ideally, it would pull the baseUrl() from the request object and use
> > that to prefix that path:
> > 
> >     ->setLocalPath($request->getBaseUrl() . '/js/dojo/dojo.js')
> > 
> > Only that line would need to change for the dojo includes to work
> > correctly.
> >
> Thanks Matthew,
> 
> It's not quite working for me. Where does the $request object come from?

Hmm.... Add the following to your constructor, at the end:

    $request = new Zend_Controller_Request_Http;
    $this->front->setRequest($request);

Then, in the initView() method, do the following:

    $request = $this->front->getRequest();

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to