[TYPO3-shop] Customizing the pagebrowser
Franz Holzinger
franz at fholzinger.com
Sat Jul 1 08:42:53 CEST 2006
Hello Robert,
> Does anybody know how to style the appearance of the pagebrowser in list
> view?
> Currently the links to the single pages are displayed one right after
> another which makes it difficult to distinguish them, especially for
> screen readers. The WCAG has a quite good requirement which also
> increases usability for non-disabled persons: Successive links should be
> seperated by printable letters which are surrounded by a blank space.
>
> Currently it's
> [1 2 3 4 5]
>
> A nicer way would be:
> [1 - 2 - 3 - 4 - 5]
>
You must change this directly in the code:
tt_products/lib/class.tx_ttproducts_list_view.php
change the line
$wrappedSubpartArray['###LINK_BROWSE###']=array('',''); // <- this could
be done better I think, or not?
for ($i = 0 ; $i < ($productsCount/$this->config['limit']); $i++) {
if (($begin_at >= $i*$this->config['limit']) && ($begin_at <
$i*$this->config['limit']+$this->config['limit'])) {
$markerArray['###BROWSE_LINKS###'].= ' <b>'.(string)($i+1).'</b> ';
into
...
if ($productsCount > $this->config['limit'] ) { // there is more than
one page, so let's browse
$wrappedSubpartArray['###LINK_BROWSE###']=array('',''); // <- this
could be done better I think, or not?
$postSeparator = '- ';
for ($i = 0 ; $i < ($productsCount/$this->config['limit']); $i++) {
if ($i + 1 >= ($productsCount/$this->config['limit'])) {
$postSeparator = '';
}
if (($begin_at >= $i*$this->config['limit']) && ($begin_at <
$i*$this->config['limit']+$this->config['limit'])) {
$markerArray['###BROWSE_LINKS###'].= ' <b>'.(string)($i+1).'</b>
'.$postSeparator;
// you may use this if you want to link to the current page also
//
} else {
$addQueryString['begin_at'] = (string)($i * $this->config['limit']);
$tempUrl = $this->pibase->pi_linkTP_keepPIvars((string)($i+1).'
',$addQueryString,1,0);
$markerArray['###BROWSE_LINKS###'].= $tempUrl.$postSeparator;
}
}
} else {
More information about the TYPO3-project-tt-products
mailing list