Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mitchel Bennis 15 posts 20 karma points
    Apr 10, 2009 @ 09:52
    Mitchel Bennis
    0

    XSLTsearch navigate search results to other page

    Good morning all,

    yesterday I downloaded Douglas his XSLTsearch package version 2.7

    i've inserted the search box into my website and it works great! but i want to change a few things to the search result, as some of you may know the results appear beneath the search box. i am working with multiple small boxes on the main page and i've put the search box inside one of them.. so when i search for something all the results appear beneath it and i cant see them anymore.

    what i want to accomplish,

    when you press the search button, i want it to redirect to a page called "MainResultPage" and place the results in a large box called BoxContent

    could someone give me a headstart on how to achieve this?
    oh and please be gentle as i dont have any experience in xslt.

    Regards,

    Mitch

  • Mitchel Bennis 15 posts 20 karma points
    Apr 14, 2009 @ 09:37
    Mitchel Bennis
    0

    hasn't anyone done this before?:-s

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 14, 2009 @ 11:06
    Douglas Robar
    0

    This is quite easily done.

    First, though... if you're using umbraco 4.0, though you should use the XSLTsearch 2.8 Runway Module because it has been optimized for umbraco 4 and the new Masterpage syntax. Simply install Runway if you haven't already (go to the Developer section in umbraco and select the Install Runway item). Then you can install various Modules for Runway. That's where you'll find XSLTsearch 2.8.

    If you're using umbraco 3.x then XSLTsearch 2.7 is the version to use.

    Then, read these forum posts for guidance. They all reference the

  • Mitchel Bennis 15 posts 20 karma points
    Apr 14, 2009 @ 12:23
    Mitchel Bennis
    0

    thanks for the reply drobar :)

    going to work on it now!

  • Mitchel Bennis 15 posts 20 karma points
    Apr 14, 2009 @ 16:16
    Mitchel Bennis
    0

    right, i got everything working the way i want it to work.

    but 1 problem has come up..

    i have the same header for each page, and the search box is now inside the header instead of in a box.

    the search function doesnt work when i search for lets say "e"

    but this problem only occurs on the homepage, when i go to my other sub pages the search function works perfectly!

    -o


    any tips?

    Mitch


  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 14, 2009 @ 16:26
    Douglas Robar
    0

    That is strange!

    Can you successfully search for anything from the homepage?

    If not, then look to be sure that the form is the same on the homepage as on the other pages (probably somewhere in your templates). No matter where you are on the site you should be doing a form submission to the search page (/MainResultPage.aspx I think, based on your original post), and you should be sending a form field or querystring for the 'search' field. It might look like this when you get to the search page:

    http://localhost/MainResultPage.aspx?search=e

    Let us know what you find out.

    cheers,
    doug.

  • Mitchel Bennis 15 posts 20 karma points
    Apr 15, 2009 @ 08:22
    Mitchel Bennis
    0

    when i'm on the homepage i cant look for anything it just reloads the page and resets the input field..

    but when i go to my manuals page (http://localhost/manuals.aspx) its works.. when i look for "R" with the search function and it redirects me to my result page and shows the me search results and the url looks like this:

    http://localhost/MainResultPage.aspx

    and thats it, this is the code i'm using in the header:

    [code]





    title="Search now" src="/media/1589/icon-target.gif"
    width="17" height="17"/>


    [/code]


    regards,

    Mitch


  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 15, 2009 @ 11:52
    Douglas Robar
    0

    Sounds like the homepage template has a asp form around it already and keeps posting back to itself rather than to the /MainResultPage.aspx. Compare the homepage template to the template you use for the result page, or any other page that has search working on it.

    Another option is to use the method="get" rather than method="post" in your form. That way you can also see if the search term is sent to the search macro properly.

    cheers,
    doug.

  • Mitchel Bennis 15 posts 20 karma points
    Apr 15, 2009 @ 12:35
    Mitchel Bennis
    0

    aah yes, i had a form arround my homepage because i have 3 forms shown on the homepage, and all called forth with macro's and they dont all show if i dont have the form arround my homepage.

    even if i put the forms inside the macro's..

    what kind of form do you think i should use arround, lets say 2 DDL's with a DB connection to get links to other pages as i dont want to hardcode them into my DDL



    Mitch

  • Mitchel Bennis 15 posts 20 karma points
    Apr 15, 2009 @ 12:39
    Mitchel Bennis
    0

    just tried to put the form inside one of my macro's but then i get this on my homepage:

    Error creating control (/usercontrols/MainPage/Forms/DDLForm.ascx).
    Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information!

    8-[

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Apr 15, 2009 @ 14:04
    Douglas Robar
    0

    Very strange.

    If you're comfortable doing so, feel free to contact me through my website (below) and let me know the login credentials for your umbraco site and I'll give it a look. Perhaps another set of eyes can spot the issue.

    cheers,
    doug.

  • Mitchel Bennis 15 posts 20 karma points
    Apr 16, 2009 @ 10:00
    Mitchel Bennis
    0

    sorry, but that wont be possible as its an intranet site but thank you for the offer Douglas =d>

    but i have one small problem left maybe you can help me,

    problem:

    i cant get all my forms working at the same time.

    on my homepage (as i said earlier) i have 3 forms 1 with a search function for looking in Manuals, 1 for looking in the DB with all the employees of the company and 1 with 2 DDL's with links to other pages.

    all these forms are macro's and when you go to the uhm.. the manuals sub page i got 1 large box that contains a summary of all the manuals and when you click on 1 of the manuals the large box will load the manual.. and besides the large box i again called forth the macro with the manual box

    something like this:

    [code]
    ---------------- ------
    | | | |
    | | | |
    | | ------
    | |
    | |
    | |
    ----------------[/code]

    i tried the following options:

    * putting a

    tag on the homepage just inside my tag

    the result was that i got all my forms on my homepage but they didnt work properly better yet they dont work at all and i dont see them on my sub pages

    * putting a tag inside the macro's

    again this would only show them only on the homepage, but i would only get 1 form working.. the one that gets loaded first will be the one that i could see.. the rest wasnt there.. and on the sub pages i couldnt see the forms

    * putting a tag arround my macro's and inside my macro's

    this didnt do anything i just got this error:

    Error creating control (/usercontrols/MainPage/Forms/SearchFormMainPage.ascx).
    Maybe file doesn't exists or the usercontrol has a cache directive, which is not allowed! See the tracestack for more information!

    the funny thing is..

    the xslt runway module works all the time, this has to be something with the form tag i'm sure of it

    [code][/code]

    with the other forms i have to use
Please Sign in or register to post replies

Write your reply to:

Draft