Copied to clipboard

Flag this post as spam?

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


  • Frederik T 216 posts 306 karma points
    Apr 11, 2013 @ 13:34
    Frederik T
    0

    Displaying document property in results page

    I have a request of sorts, because i cant figure this out. I am using xslt search 2.7 (ugh...), the old schema and sadly no room for upgrade (double ugh...). And its with umbraco 4.9.0 no less.

    I need to modify it to display the author name (document type property) and the nodes publish date (create date is fine too). something like this:

    My nodes name written by X on xx/xx-2013
    bla bla bla bla bla bla bla....

    So, its not like the preview fields, it need to be displayed there at all times (unless the author property does not exist).

    Its a big request, i know, but help would be very nice, or some directions on what to do.

  • Chriztian Steinmeier 2690 posts 8066 karma points MVP 3x admin c-trib
    Apr 11, 2013 @ 14:50
    Chriztian Steinmeier
    0

    Hi Frederik,

    I couldn't get my fingers on a copy of a v2.7 "XSLTsearch.xslt" file - could you put in in a Gist (or Pastebin) somewhere? — I'll take a look and guide you through where to change stuff...

    /Chriztian

  • Frederik T 216 posts 306 karma points
    Apr 11, 2013 @ 15:19
    Frederik T
    0

    Awesome, here you go :) https://gist.github.com/anonymous/5363290 If its too much trouble, then i understand if you drop it :p

  • Chriztian Steinmeier 2690 posts 8066 karma points MVP 3x admin c-trib
    Apr 11, 2013 @ 17:26
    Chriztian Steinmeier
    100

    Hi Frederik,

    I've forked & modified a version here: https://gist.github.com/greystate/5364109/revisions

     

    (I forgot about old schema so I had to revise it - should be easy to see what changed, though).

    So the trick is to find the spot in the output section where you want the extra output, and then just "call" (using apply-templates) a separate template to render the extra content. That way you have a clean cut between yours and the original's output - and it's much easier to update once you have to upgrade the solution to a newer version.

    And let me know if you have any questions! :-)

    /Chriztian 

     

  • Frederik T 216 posts 306 karma points
    Apr 12, 2013 @ 10:14
    Frederik T
    0

    Amazing! It works like a charm, thank you very much for the help. You have helped me numerous times now since i began working with umbraco, its about time i owe you a beer, haha.

Please Sign in or register to post replies

Write your reply to:

Draft