Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

No "back to previous view" when searching...

  Asked By: Anita    Date: Feb 24    Category: Sharepoint    Views: 2567

Here's one for everybody... When you browse through the "document
library" and choose "show actions" on the left hand side of the page
there is an "Actions" box. The first line in this "Actions" box is a
link for "Back to previous view." However, when you SEARCH for a
document and choose "Show Actions" for a document, you are also
presented with the exact same screen, but the "Actions" box DOES NOT
have the link for "Back to previous view". The only diference lies in
the URL. When drill down through the "document library" and
choose "show actions" the resulting URL ends
with "UrlToReturnTo=parentfolder"... when you SEARCH for a document
and choose "show actions" the resulting URL end
with "UrlToReturnTo="... (no "parentfolder). Funny thing is, if you
type "parentfolder" at the end of that URL and refresh, the "Back to
previous view" link show up in the "Action" box... PAAAAAA-
LEASE!!! How can this be resolved..



2 Answers Found

Answer #1    Answered By: Nisarg Kapadia     Answered On: Feb 24

For sure it will not be a supported action, and for the moment I can not
guess what further consequences it will have, but I changed the
"SearchResultsPart.xsl" file in the resources folder. I hardcoded the option
parentfolder in the resultlink:


Changed into just:


For now it works, but as I mentioned, I do not know the further consequences
of this changes.

Answer #2    Answered By: Jaferry Khan     Answered On: Feb 24

Yes, it does work; and the link  shows up saying "Back
to previous  view". However, when you click on it, it actually take
you TO THAT DOCUMENTS PARENT FOLDER in the document  library, not back
one page. Does anyone know how to, in XSL, hard code an instruction
to go back  on page? For example, in HTML you can plase this code
under a button (history.go(-1);return true) and when that buton is
clicked, it will take you back on page. So ins XSL, rather that
having the URL state "UrlToReturnTo=parentfolder", have it
state "UrlToReturnTo=code to go back one page".

Didn't find what you were looking for? Find more on No "back to previous view" when searching... Or get search suggestion and latest updates.