- decorate the classes to append an EOL
- use ob_start and html tidy to tidy the content after
--
/James
On Fri, Apr 18, 2008 at 1:09 PM, Robert Castley <[EMAIL PROTECTED]>
wrote:
>
>
> In my layout.phtml file I have:
>
> <?php echo $this->doctype('XHTML1_STRICT'); ?>
> <html>
> <head>
> <?php echo $this->headLink()->appendStylesheet('css/' . $this->css .
> '.css'); ?>
> <?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.
> ________________________________________________________________________
>