Topic: TV, problem with "name==value" assignments in default  (Read 843 times)

Pages: [1]   Go Down

#1: 1-Aug-2006, 08:53 AM


kudolink
Posts: 241

MODx Entusiast!

WWW
I've created a check box list with this input values:
Code:
Vino italiano=={{vinoit}}||Vino estero=={{vinoes}}||Liquori e distillati=={{dist}}||Alimentari=={{alim}}||Delicatessen=={{delic}}||Attrezzature=={{attr}}
"Vino italiano=={{vinoit}}" is configured as default value.
In my mind I figured that the result will be:
  • "Vino italiano" check box checked by default in the edited document;
  • Content of {{vinoit}} outputted on the page (because of the default checked box);
  • Nothing on the page if I uncheck all the check boxes.

I was wrong: it outputs "Vino italiano==contents of chunk" on the page,  the "Vino italiano" check box is not checked by default (if I check it the page output is the content of chunk, so it's right) and everytime I uncheck all the check boxes it starts outputting "Vino italiano==contents of chunk" again.

What is wrong, this beaviour or my expectations?

Everything is fine if I use "Value" instead of "Name==value" in input value. Basically I can't declare by default a value from those I've declared like "Name==value".

MODx version is 0.9.2.1

PS: mmm... I think I've broken around one hundred grammatical rules of English. A record.
If you need I'll explain further.

« Last Edit: 1-Aug-2006, 09:00 AM by kudolink »
kudo
www.kudolink.com - webdesign (surprised?)

  proudly uses 

#2: 1-Aug-2006, 09:06 AM

Foundation

rthrash
Posts: 11,284

WWW
The parser will translate any chunks it finds into their represented values.
MODx is a content managmeent framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Please help us help you when asking for assistance and read the wiki. Searching the forums from the top level helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.

#3: 1-Aug-2006, 09:15 AM


kudolink
Posts: 241

MODx Entusiast!

WWW
The problem is not the chunk... I know, I've done better if I chopped that thing  out of the example...

Leave chunks aside, it works perfectly, this is not the problem.

The problem is that I can't check the first check box by default, 'cause the default area doesn't understand "Name==Value" as "check the Name box and use Value as output".
kudo
www.kudolink.com - webdesign (surprised?)

  proudly uses 

#4: 4-Aug-2006, 06:03 AM

Coding Team

doze
Posts: 4,020

....Boom!

What happens if you just put the value of the checkbox you want to be checked by default to the default value field? Like {{vinoit}} for example.
New MODx wiki! Please help up with documentation efforts! || Old Wiki

"He can have a lollipop any time he wants to. That's what it means to be a programmer."

#5: 4-Aug-2006, 08:42 AM


kudolink
Posts: 241

MODx Entusiast!

WWW
No check box is checked but the TV outputs {{vinoit}} as I would.

Attention: this may seem a good behaviour (the {{vinoit}} chunk is visible by default, in effects) but it scrambles up my Ditto filters in another page, because the TV is not recognized as "{{vinoit}}" (that checkbox is unchecked, after all).

Needing that type of filter, I rethinked the management of that multi-checkbox TV in an array of different TVs with one check box.

But I'm still curious on how to accomplish the right kind of behaviour.
kudo
www.kudolink.com - webdesign (surprised?)

  proudly uses 
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.