Pagination: simple "prevoius" and "next" buttons?

General project discussion. NOT for help questions.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Before I go about trying to figure out how to add CSS rules to the breadcrumbs, I figured I should just ask if there is a simpler way to solve this problem using either the CMSMS code itself or some php...

Rather than having the Breadcrumb navigation show the title of the next Page, is there a way to just keep the buttons to simply say "previous" and "next" (or substitute with images)?
Pierre M.

Re: Pagination: simple "prevoius" and "next" buttons?

Post by Pierre M. »

Have you read the help of the cms_selflink tag ?
What about using the "dir" and "text" parameters ?

Pierre M.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Do you have any idea where I could find help on the cms_selflink?
I can't find any such help in the Documentation.

Also, any idea why every time I click on something in the Handbook it defaults to Deutsch? It doesn't matter how many times I click "English." Once I click anything from the right column table of contents it brings up the Deutsch page. For a few days, I actually thought those entries were only available in Deutsch!!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by calguy1000 »

I'm going to say this, and say it once, and people can feel free to copy and paste my text wherever they want.

Users of any package need to learn to look around, see what options are where, look at every link, and see what they do.  There are a surprising amount of people that wont take that time.... and would rather post a question on a forum and wait for three days for an answer then spend an hour or two just looking around this package that they've decided to use.  Surprisingly, many people would also rather post a rude follow up to their post, and wait another three days than spend that same hour or two just looking around.

The answer to the above question is very simple of people would just look around.  spend a couple of hours reading the default content, exploring all of the menu options, and their various tabs, and all of the links contained within them, etc.

There is no way that the documentation can ever explain every option or every checkbox, or every link or the text displayed with them.  People have to look around, click on things, read, understand, and experiment before trying to use a package that they have no experience with, for a production product.

I'm not saying that people need to be an expert with smarty, or it's infinite knowledge (but once you see those tags in the various templates, and you know because we advertise it very well that smarty is used throughout CMS, you should at least do a google search about smarty, and do some reading).  Or that they need to be an expert in CMS, but they should be able to at least find the 'help' text that is built into the various pages, and ask an intelligently worded, well researched question based on trial and error rather than impatience.

Again, and I'm not aiming this at anybody.... if you can't take the time to research your problem, and to explain it well, why should we take the time to help you?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Like I said, I haven't been able to locate anything about what was mentioned. I've looked at the pagination and cms_selflink documentation (or tried to find out where the hell it is located... a search for cms_selflink turns up jack squat... and the fact that the documentation keeps feeding me Deutsch for no apparent reason doesn't help.)

Calguy, if you're not aiming this at anybody, why have you chosen to comment here?
Last edited by nate22 on Fri Mar 28, 2008 4:03 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by Nullig »

If you look in Admin/Extensions/Tags, you'll see a list of the tags. Click on the "cms_selflink" tag and it will show the parameters for the tag.

In the case of the next and prev the tag syntax, if you want to use images, it would be like:

Code: Select all

{cms_selflink dir="next" image="next.png" text="Next"}
{cms_selflink dir="prev" image="prev.png" text="Prev"}
Without images...

Code: Select all

{cms_selflink dir="next" text="Next"}
{cms_selflink dir="prev" text="Prev"}
Nullig
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Thank you very kindly, Nullig! And with that little tip, you have most likely saved me from asking numerous other questions. I've been searching through documentation, not having any clue I could find definitions and help where you have just indicated!

Yes, if I "clicked around" I suppose I could have eventually found it, as calguy said, but that is counter-intuitive when one is attempting to learn a new system (one normally goes to the HELP section,wiki or other documentaiton, rather than clicking around aimlessly).
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

This is the strangest thing. In the tags section for cms_selflink, under parameters, is the following entry:

• lang - Display link-labels ("Next Page"/"Previous Page") in different languages (0 for no label.) Danish (dk), English (en) or French (fr), for now.

So my template has the following code:

Code: Select all

{cms_selflink dir="prev" class="hdrollover2" text="previous" lang=0}
{cms_selflink dir="next" class="hdrollover1" text="next" lang=0}
Logical, right?

But, for some reason, "previous" still shows up but "next" is gone. Yet, both have the exact same lang=0 parameter.

Not only that, but my CSS class has text-indent:-9999px applied. When I remove the CSS styling, BOTH labels appear.

So, apparently, the lang=0 parameter isn't working at all.

I tried to just delete text="next" and text="previous" parameters from the tag to see if that was a simple solution, but CMS just fills in replacement tags.

Any idea why lang=0 would not work?
Last edited by nate22 on Tue Apr 01, 2008 2:57 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by Nullig »

Did you try lang="0" (note the quotes)?

Nullig
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Did you try lang="0" (note the quotes)?

Nullig
Well, I didn't before because I thought quotation marks would refer to a string (I figured there must be a reason the help section didn't show quotes). But, based on your suggestion, I just added quotes around the "0"... and "previous" still shows up. "Next" still is not showing, which is what I want. I double-checked that they are both zeros and that one isn't a capital letter "o". That's the only other thing I could think of.
Last edited by nate22 on Tue Apr 01, 2008 3:07 pm, edited 1 time in total.
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Correction:

I removed label=0 entirely and MORE words appeared!

Apparently, these extra words are the labels.

I don't know why, but it isn't going to let me get rid of the text on one button. It got rid of the labels fine, though.



If I delete text="next" and text="previous" then the page titles show up in place. If I use imageonly=1 I probably have to use an image="image.png" parameter also -- I was avoiding this because I wanted a rollover effect, which I can get with CSS. I have no idea how I would attach a javascript rollover to a smarty tag, but it seems like a pain in the ass.
Last edited by nate22 on Tue Apr 01, 2008 3:19 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by Nullig »

What if you used text=" " instead?

Nullig
nate22
Forum Members
Forum Members
Posts: 63
Joined: Thu Mar 06, 2008 8:09 pm

Re: Pagination: simple "prevoius" and "next" buttons?

Post by nate22 »

Nullig wrote: What if you used text=" " instead?

Nullig
I actually considered that briefly, but I forgot about it quickly because it seemed like a "hack." Thanks for reminding me. That's probably the only solution that will work! Once again, thank you!
angelam

Re: Pagination: simple "prevoius" and "next" buttons?

Post by angelam »

Hello,

I got problem on this TAG. it doesn't display double quotes.

Example:
Frame 8"x12"

It will display only before the first quote like Frame 8.

Any idea.

-angela
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pagination: simple "prevoius" and "next" buttons?

Post by Dr.CSS »

It is most likely picking it up as part of the logic, have you tried using single quotes or leaving quotes out all together...
Post Reply

Return to “General Discussion”