Page 1 of 1

Overriding Default "Center" for (Previous - Next) Page Numbr

PostPosted: Tue Aug 20, 2013 6:42 pm
by tmlogo
I've been trying to figure out a way to get my following code to align to the right:

[-- IF PAGE.ProductsPerPage 0 --]
# do nothing
[-- ELSE --]
[-- PrevNext --]
[-- END_IF --]

I finally looked at the Page Source Code and I see that ShopSite defaults to center. Is there anyway to override this?

Thank you in advance

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Tue Aug 20, 2013 8:42 pm
by Jim
There should be some css styles that adjust the placement. You could either edit the css in the template (probably an include file) or add the css somewhere on the page that will load after the css from the template, like in the global header, so that it will override the prior style definition.

You can find the styles/classes used by viewing the html source of the page.

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Wed Aug 21, 2013 9:13 am
by tmlogo
Thanks Jim, I will give that a try.

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Wed Aug 21, 2013 9:41 am
by tmlogo
Unfortunately it didn't work. I also found this command:

[-- PrevNext {NoCenter} --]
Insert multipage navigation links. By default, the links are centered. Use the NoCenter attribute to remove the <center> tags.

This tag did not work either. Any other thoughts?

Thanks in advance

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Wed Aug 21, 2013 9:51 am
by Jim
Please provide a link to the site so we can see what html code is being generated on the page.

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Wed Aug 21, 2013 10:05 am
by tmlogo
The pages aren't live yet (I was asked to remove the URL addresses), but here is the code that is being generated. I'm hoping that is enough to go by:

<center>
<span class="currentpage"><b>1</b></span>&nbsp;<span class="prevnext"><a class="prevnext" href="http:">2</a></span>&nbsp;<span class="prevnext"><a class="prevnext" href="">3</a></span>&nbsp;<span class="prevnext"><a class="prevnext" href=">4</a></span>&nbsp;<span class="prevnext"><a class="prevnext" href="">Next</a></span>&nbsp;</center>

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Wed Aug 21, 2013 10:13 am
by loren_d_c
When you use the optional 'NoCenter' parameter for the PrevNext tag, the tag in your template should look like this:

[-- PrevNext NoCenter --]

Also note that after you make the change to the template you will need to go to Utilities -> Publish and regenerate the store pages, then when you view the store pages make sure you are fully refreshing the page in your browser (hold the Shift key when you hit the Refresh button in Firefox, F5 in IE) so that you are not looking at an old cached version of the page.

-Loren

Re: Overriding Default "Center" for (Previous - Next) Page N

PostPosted: Wed Aug 21, 2013 10:18 am
by tmlogo
Thanks Loren that worked. ;-)