Hi David,
In order to avoid duplicate content due to navigation.html, I did a modification to transfert to the root of a search instead of creating a 1.html page in the navigation menu each time someone press page 1 (or previous=1). To take into consideration all variation (due to translation for example), I used the URL of the page instead of the regular brand/product... page.
Well there is probably a better/simpliest/cleaner way to do it but it is how i fixed it.
======
after
$prevHREF = $prevPage.".html";
if(strstr($prevHREF,"1.html")) {
$urldemandee=$_SERVER['REQUEST_URI'];
$urldemandee = str_replace("/2.html","/",$urldemandee);
$prevHREF = $urldemandee;
}
$pageOneHREF = "1.html";
if(strstr($pageOneHREF,"1.html")) {
$urldemandee=$_SERVER['REQUEST_URI'];
$pos_url = strripos($urldemandee, "/");
$pos_url=$pos_url+1;
$urldemandee = substr($urldemandee, 0, $pos_url);
$pageOneHREF = $urldemandee;
}
$pageHREF = $i.".html";
if(strstr($pageHREF,"1.html")) {
$urldemandee=$_SERVER['REQUEST_URI'];
$pos_url = strripos($urldemandee, "/");
$pos_url=$pos_url+1;
$urldemandee = substr($urldemandee, 0, $pos_url);
$pageHREF = $urldemandee;
}
Hi David and John100,
The change does not work properly.
This does not work beyond 10, 20, 30, etc ...
The link works fine on 10, but for 11, the url is empty.
Same for the 21, 31, 41, 51, etc. ...
Cheers,
Raoul
Hello Raoul / John,
Have a go with the following modification since it is safe to use "./" to link to the root of the current level. In html/navigation.php, look for the following code at line 12:
$prevHREF = $prevPage.".html";
...and REPLACE with:
$prevHREF = ($prevPage==1?"./":$prevPage.".html");
Then look for the following code at line 71:
$pageHREF = $i.".html";
...and REPLACE with:
$pageHREF = ($i==1?"./":$i.".html");
...and finally the following code at line 95:
$nextHREF = $nextPage.".html";
...and REPLACE with:
$nextHREF = ($nextPage==1?"./":$nextPage.".html");
Cheers,
David.
--
PriceTapestry.com
Hi David.
It works perfectly.
Thank you for your intervention (as you work on Sundays??).
: o)
Cheers,
Raoul
Looks good, John!
Cheers,
David.
--
PriceTapestry.com