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

Questions and answers about ShopSite Custom Templates

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

Postby tmlogo » Tue Aug 20, 2013 6:42 pm

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
tmlogo
 
Posts: 103
Joined: Tue Jun 17, 2008 3:00 pm

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

Postby Jim » Tue Aug 20, 2013 8:42 pm

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.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

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

Postby tmlogo » Wed Aug 21, 2013 9:13 am

Thanks Jim, I will give that a try.
tmlogo
 
Posts: 103
Joined: Tue Jun 17, 2008 3:00 pm

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

Postby tmlogo » Wed Aug 21, 2013 9:41 am

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
tmlogo
 
Posts: 103
Joined: Tue Jun 17, 2008 3:00 pm

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

Postby Jim » Wed Aug 21, 2013 9:51 am

Please provide a link to the site so we can see what html code is being generated on the page.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

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

Postby tmlogo » Wed Aug 21, 2013 10:05 am

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>
tmlogo
 
Posts: 103
Joined: Tue Jun 17, 2008 3:00 pm

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

Postby loren_d_c » Wed Aug 21, 2013 10:13 am

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
loren_d_c
 
Posts: 2569
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

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

Postby tmlogo » Wed Aug 21, 2013 10:18 am

Thanks Loren that worked. ;-)
tmlogo
 
Posts: 103
Joined: Tue Jun 17, 2008 3:00 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 23 guests

cron