Page 1 of 1

a simple back button

Posted: Tue Jan 26, 2010 8:49 pm
by steven999
I love this software, I'm not so crazy about the docs.  I've searched for this and looked through the default install for an example.

I'm trying to build a simple "back" link to go at the bottom of a page, when clicked, it takes you back to the last page.

I've reviewed the tag library, deciding I have to use cms_selflink. End up trying a variety of set ups, finishing with this:

{cms_selflink dir="prev" label="" text="Back"}

It works, but I think it's taking you back to the previous item in the menu, not the previous page you were on.

The "back" button in the detailed news template is what I want....but that tag - {$return_url} doesn't seem to be in my list of tags under extentions???, and it doesn't work if I place it in the document myself.

Also, I was looking to see if the wysiwyg editor breaks tags....even if placed in with it turned off, then later opened with tiny wysiwyg on.  This info seems pretty critical. not much luck looking for that either.

Re: a simple back button

Posted: Tue Jan 26, 2010 9:06 pm
by jmcgin51
yes, Tiny (or any other WYSIWYG) can break tags and HTML code.  Turn the WYSIWYG off if you will be putting tags or especially HTML entities in your page.

Re: a simple back button

Posted: Wed Jan 27, 2010 7:50 am
by Dr.CSS
That would be a simple JS call...

http://lmgtfy.com/?q=javascript+back

Re: a simple back button

Posted: Wed Jan 27, 2010 3:59 pm
by steven999
I knew you could do it in javascript, I just thought there would be a built in ability to do something so fundamental.

I'm still learning how the system and tags and editing work and get applied here in cmsms.

I read a sticky just now about keeping smarty tags away from the designers and page editors...that doesn't seem very practical, I have a whole page of employees...each one is linked to an indepth page,  so it ends up on the first page like this:

>{cms_selflink page='dsmith' text='Dave Smith'}Dave Smith' , it breaks the link. I looked at cms_selflink help but couldn't find anything.

Re: a simple back button

Posted: Wed Jan 27, 2010 4:14 pm
by Wishbone
I find it easier to press the back button in my browser.

I find it annoying when I press a javascript back button, which confuses the stack in the browser back button so that when I press the browser back button, I end up going forwards to where I had pressed back..  ???

Re: a simple back button

Posted: Wed Jan 27, 2010 9:21 pm
by steven999
if used properly, there are good places for "back" links. It's nice to have options.