Closed siebird closed 8 years ago
I'm away from my laptop at the moment so this is a very short response via mobile. I think it's because the current 'entry' variable isn't available in the control panel - it's a front end template thing. Please see my answer on the following thread for a possible workaround:
Lewis, thanks for the reply. This worked. I ended up reorganizing the content under one section and added notes to the user to save the form in steps to load in correct settings.
{% set thisEntry = craft.entries.id(craft.request.getSegment(3) | split("-") | first).first %}
{% if thisEntry.factors is defined %}
{% for row in thisEntry.factors %}
{ "value" : "{{ row.factor|kebab }}", "label" : "{{ row.factor|raw }}" }{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
OK, good to hear. I think this may also work:
{% set thisEntry = craft.entries.id(element.id).first() %}
It's been a while since this plugin was last updated so I'll see if any improvements can be made. Posting this for future reference:
https://plus.google.com/107469985815708452956/posts/fBuQ2k5iDTB
Hey Lewis,
Thanks for sharing this plugin. Pretty slick!
So, this was working for me the other day and now it's not. The only thing different is that I added a 3rd custom field that is using this plugin. I'm currently getting the following error while editing an entry:
Variable "entry" does not exist
. All templates are currently usingentry
variable (the current entry being edited) to pull into related content to build the dropdown menu.