Custom data field is always “false”

Home Forums MapPress Support Custom data field is always “false”

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20931
    finalwebsites
    Participant

    Hi,
    please check these screenshots. I try to use an URL as url for the POI name.
    But on the frontend I get always false. I guess my poi.props code is not valid.
    https://www.dropbox.com/scl/fo/qh51yfb318kg30a73ztp9/AFD4-SN0az9-SWmOiWrUXnk?rlkey=7xr8co4lwilc5gp9p3wcaatt1&dl=0

    regards
    Olaf

    #20932
    finalwebsites
    Participant

    PS. I tried to post the same message via the contact form and that doesn’t worked.

    #20935
    Chris
    Keymaster

    Hi,

    In the template you have specified a custom field from the post {{{poi.props.kerkurl}}}. Please specify a data field instead: {{{poi.data.kerkurl}}}.

    I think this may be because there was a bug: the button “POI data field” was suggesting “poi.props.myfield” instead of “poi.data.myfield”, so thank you for bringing this to my attention. The bug is fixed in version 2.91.6, which will be available soon.

    #20936
    finalwebsites
    Participant

    Hi Chris,

    Yes, changing “props” into “data” solved the problem.
    I checked also the docs and this is what I found:

    Custom Fields
    To add a custom field to a template, use this syntax:

    {{poi.props.myfield}}

    MapPress will automatically include that custom field when the template is output.

    Maybe you need to change that information too?

    Anyway, great plugin 🙂

    #20937
    Chris
    Keymaster

    Thanks, the docs are actually correct – but they’re for mashup custom fields, not the POI data fields. The POI fields are new, and I haven’t had a chance to document them at all yet, but I will – please bear with me 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.