samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Two elements with the same id this means validation fail. #483

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If you insert two nextgen gallery widget on siderbar w3c validator finds two 
elements with same id and this generates a validation error for all pages.
The problem is id="ngg-webslice" i have written a little workaround:

I have edited the file /nextgen-gallery/widgets/widgets.php at line 301

I've substitute this line

$before_widget .= "\n" . '<div class="hslice" id="ngg-webslice" >' . "\n"; 

with this lines

global $nggwebslice;
if( is_numeric($nggwebslice) ) { $nggwebslice++; }
else { $nggwebslice = 1; };
$before_widget .= "\n" . '<div class="hslice" id="ngg-webslice-' . $nggwebslice 
. '" >' . "\n"; 

and it works :)

I hope I was helpful.

Regards

Original issue reported on code.google.com by aurem.sa...@gmail.com on 18 Mar 2012 at 10:55