-- Robert Castley <[EMAIL PROTECTED]> wrote
(on Saturday, 19 April 2008, 09:34 PM +0100):
> Thanks to all who responded!  But there is still an issue if you use ZF.
> 
> E.g.
> 
> <?php
> echo $this->headMeta()->appendHttpEquiv('pragma', 'no-cache')
>                       ->prependHttpEquiv('something', 'nothing');

Call these *prior* to echoing. :-)

> ?>
> 
> This will add the prepend to the end of the append line.
> 
> Am I being fussy?  But my source needs to be readable, at least for checking/
> debugging.
> 
> Have a great weekend!
> 
> - Robert
> 
>  
> 
> -----Original Message-----
> From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2008 13:56
> To: [email protected]
> Subject: Re: [fw-general] Layouts and nicely formatted source issue
> 
> -- Robert Castley <[EMAIL PROTECTED]> wrote (on Friday, 18 April 2008,
> 01:09 PM +0100):
> > In my layout.phtml file I have:
> >
> > <?php  echo $this->doctype('XHTML1_STRICT'); ?> <html>
> >   <head>
> >     <?php echo $this->headLink()->appendStylesheet('css/' . $this->css .
> > '.css'); ?>
> 
> Add a blank link between this and the next line, or make sure there is a space
> after your closing ?> tag; otherwise, no newline will be presented between 
> this
> and the next line. (PHP ignores line-endings after a closing ?> tag)
> 
> >     <?php echo $this->headMeta()->appendHttpEquiv('pragma', 'no-cache'); ?>
> >   </head>
> >   <body>
> > 
> > But the source in the browser is not nicely formatted i.e. no EOL
> >
> > E.g.
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-strict.dtd"><html>
> >   <head>
> >     <link href="css/magik.release.css" media="screen" rel="stylesheet" type=
> > "text/css" />    <meta http-equiv="pragma" content="no-cache" />  </head>
> >
> >   <body>
> >
> > I would like it to look like:
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-strict.dtd"> <html>
> >   <head>
> >     <link href="css/magik.release.css" media="screen" rel="stylesheet"
> > type= "text/css" />
> >     <meta http-equiv="pragma" content="no-cache" />
> >   </head>
> >   <body>
> >
> > No I can achieve this by adding PHP_EOL to the end of each echo
> > statement but then the code starts to look messy:
> >
> > E.g.
> >
> > <?php  echo $this->doctype('XHTML1_STRICT') . PHP_EOL; ?> <html>
> >   <head>
> >     <?php echo $this->headLink()->appendStylesheet('css/' . $this->css .
> > '.css')  . PHP_EOL;  ?>
> >     <?php echo $this->headMeta()->appendHttpEquiv('pragma', 'no-cache')  .
> > PHP_EOL;  ?>
> >   </head>
> >   <body>
> >
> > But my source is looking just fine!
> >
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-strict.dtd"> <html>
> >   <head>
> >     <link href="css/magik.release.css" media="screen" rel="stylesheet"
> > type= "text/css" />
> >     <meta http-equiv="pragma" content="no-cache" />
> >   </head>
> >   <body>
> >
> >
> > Is there another way?
> >
> > Cheers,
> >
> > - Robert
> >
> >
> > ______________________________________________________________________
> > __ This email has been scanned for all known viruses by the
> > MessageLabs Email Security Service and the Macro 4 plc internal virus
> > protection system.
> > ______________________________________________________________________
> > __
> 
> --
> Matthew Weier O'Phinney
> Software Architect       | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
> 
> ________________________________________________________________________
> This email has been scanned for all known viruses by the MessageLabs Email
> Security Service and the Macro 4 plc internal virus protection system.
> 
> ________________________________________________________________________
> 
> 
> ________________________________________________________________________
> This email has been scanned for all known viruses by the MessageLabs Email
> Security Service and the Macro 4 plc internal virus protection system.
> ________________________________________________________________________

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to