Low Variables Fieldtype blnk on publish form.
Low,
Hoping you can help with an issue and small query related to Low Variables and the Low Variables Fieldtype:
1. Low Variables Fieldtype
I can't seem to get this working, running latest EE (2.4) and LV (2.0.3), it displays as blank in the publish form (only the field title displays)?
2. Using the LV Fieldtype
I have set up some LV variables (textareas) to function as native snippets, blocks of early phasing code that are just containers (made up of HTML & EE tags) which want to be able to add to specific entries.
When i get it working will the LV Field type allow me to assign 1 or more of these blocks (LV's) to a channel entry which i can then pump out via the entries tag? And still get it to early parse.
NB. I currently have it working such that the user can select which block from a P&T Dropdown custom field and this gets parsed (using conditionals) in the entries tag, feels a little fiddly but its working).
Hope im making sense? Let me know if you need any code examples or further info?
Many thanks,
S
Replies
Low 3 Mar 2012 09:48
Hi Sam,
Have you defined a variable group in the channel field settings? I cannot reproduce the behavior you're describing.
The LV Channel field itself is parsed "in the middle", when all module and plugin tags are parsed, as shown here: EE parse order. That would be stage 5. The early parsing stage has already been by then. Also note that the channel field will only display the variable name, not the value itself. If the LV you've selected contains tags, then you'll need to use the low_variables:single tag to output the value in time for the template parser to parse those tags.
So, for example, say one of your LV's contains a simple contact form that you might or might not want to display in your entry. If that contact form is inside an early parsed LV, and you select that variable using the LV channel field, then you could use code like this to make sure the tags inside the variable get parsed:
...where {cf_low_variable} is the custom LV channel field.
Make sense?
Sam 3 Mar 2012 17:16
Low
Thanks for your feedback.
1.Yes, I've tried setting single and multiple groups in the select list. is there anything else I can try or provide to help debug?
2. Yes, thanks.
Sam
Low 4 Mar 2012 11:47
Can you give me access to your CP so I can take a look myself? You can send the login credentials to hi at gotolow dot com.
Sam 4 Mar 2012 13:09
Sure, Thanks Low
Low 6 Mar 2012 09:14
For continuity:
It would appear that the variables available in the fieldtype should have early parsing disabled and not be hidden. All of your variables were parsed early, so nothing was shown. I changed the variables in the group Content Blocks to disable early parsing, so the show up in the publish form.
I took a look at the docs, but it seems I forgot to add that piece of important info. I will add that note as soon as I can, and apologise for the confusion.
Also, I'll make it an option to choose whether to show/hide early parsed/hidden vars to the fieldtype in a future version. It made sense to filter those out, because the phase where early parsed vars are parsed has already passed when parsing the fieldtype vars.
Sam 6 Mar 2012 09:17
Thanks Low,
Great support as ever!
Sam