Noob question on Pager, link elements and valid XHMTL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Noob question on Pager, link elements and valid XHMTL

Peter Hiltz
I think I'm misunderstanding something here. I have Pager working, but it is
using link elements in the Body of the page. E.g.:

<link rel="last" href="/index.php?page=2" title="last page" />

Running it through W3C's validator, it flunks because link elements are only
allowed in the Head.

What am I missing?

TIA

--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply | Threaded
Open this post in threaded view
|

Re: Noob question on Pager, link elements and valid XHMTL

Lorenzo Alberton
Peter Hiltz wrote:

 > I think I'm misunderstanding something here. I have Pager working,
but it is using link elements in the Body of the page. E.g.:
 >
 > <link rel="last" href="/index.php?page=2" title="last page" />
 >
 > Running it through W3C's validator, it flunks because link elements
are only allowed in the Head.
 > What am I missing?


you can put them wherever you like:

===============================
<?php
$options = array(...);
$pager =& Pager::factory($options);
?>
<html>
<head>
   ...
   <?php echo $pager->linkTags; ?>
</head>
<body>
...
<?php echo $pager->links; ?>
...
===============================

HTH

Regards,
--
Lorenzo Alberton
http://pear.php.net/user/quipo

--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php