Hi David,
I made a page with a list of the brands available like this..{link saved}
Is it possible to change the layout of the grid in to 3 or 4 columns?
Looked at the other post about merchant layout, but can't make anything of it.
Rick
Is there a way of implementing this so the brands and merchants logos go horizontally across the page and not vertically? Also would there be a way to add data under each logo (Name or Description) {link saved}
Hi Shaun,
Do you mean so that large areas of space are not created if there is one letter with a large number of items immediately alongside a letter with just one or two?
Cheers,
David.
--
PriceTapestry.com
yes I would like to get rid of the large blank areas. Have it list the brands go horizontally across the page instead of vertically. Maybe even get rid of the number and letter labels, just show the loges 3 or 4 across with name under each logo.
Hi Shaun,
Yes - that layout is easy to achieve but will require a couple of code changes - if you'd like to email me your pto_atoz.php I'll do that for you...
Cheers,
David.
--
PriceTapestry.com
Would it be possible to list the code changes need to do this again. I've seemed to have lost the file you sent.
Hi Shaun,
Sure - in pto_atoz.php look for the following code at line 86:
$pto_html_atoz_afterI = 0;
...and REPLACE with:
$pto_html_atoz_afterI = 0;
$pto_html_atoz_eachI = 0;
And then look for the following code at line 116:
$each = $pto_html_atoz_each;
...and REPLACE with:
$each = $pto_html_atoz_each;
$each = str_replace("\n"," ",$each);
if (strpos($each,"%IF_EVERY"))
{
preg_match_all('/%IF_EVERY([0-9]*)%/U',$each,$matches);
foreach($matches[1] as $n)
{
if (!(($pto_html_atoz_eachI+1) % $n))
{
$each = str_replace('%IF_EVERY'.$n.'%','',$each);
$each = str_replace('%ENDIF_EVERY'.$n.'%','',$each);
}
else
{
$each = preg_replace('/%IF_EVERY'.$n.'%(.*)%ENDIF_EVERY'.$n.'%/U','',$each);
}
}
}
$pto_html_atoz_eachI++;
You'll then have %IF_EVERYn% .. %ENDIF_EVERYn% support for the A to Z / Each template...
Cheers,
David.
--
PriceTapestry.com
Hi Rick,
The Brand page is generated by the A to Z HTML Template (wp-admin > Settings > PriceTapestry.org), where you could use the %IF_EVERYn% (e.g. %IF_EVERY4%) to create a fixed number of columns table layout; however in the first instance you might like to try the neat method described in this thread which uses floating div's to create a fluid layout.
However, if you did want a fixed, for example 3 column layout; then have a go with the templates as follows:
A to Z / Before All
<div class='pto_atoz'>
<table>
<tr>
A to Z / Before
<td>
<h3>%LETTER%</h3>
<ul>
A to Z / After
</td>
%IF_EVERY3%
</tr><tr>
%ENDIF_EVERY3%
A to Z / After All
</tr>
</table>
</div>
Hope this helps!
Cheers,
David.
--
PriceTapestry.com