Copied to clipboard

Flag this post as spam?

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


  • Kyle Goulding 30 posts 192 karma points
    Jun 13, 2016 @ 13:49
    Kyle Goulding
    0

    I have created a simple Examine Search facility using the tutorial https://our.umbraco.org/documentation/Reference/Searching/Examine/quick-start

    I want to know how I can pull in further information about the different results -

    Currently there are two properties being pulled in -

    @result.Name

    @result.Url

    How are you able to find out what other properties you can call?

    I have tried - @result.pageTitle which is a property I have created in the Document Type but I get an error -

    1: 'Umbraco.Core.Models.IPublishedContent' does not contain a definition for 'pageTitle' and no extension method 'pageTitle' accepting a first argument of type 'Umbraco.Core.Models.IPublishedContent' could be found (are you missing a using directive or an assembly reference?)

  • Søren Mastrup 108 posts 473 karma points c-trib
    Jul 27, 2016 @ 20:15
    Søren Mastrup
    0

    You should be able to do this:

    var node = Umbraco.TypedContent(result.Id);
    

    From there, you can access all the properties from the node.

Please Sign in or register to post replies

Write your reply to:

Draft