<![CDATA[ Documentation (desperately?) needing improvement, examples etc. - My Forums]]> https://forums.modx.com/thread/?thread=25314 <![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129947 Quote from: lithiumlab at Jun 06, 2011, 03:02 PM

.png missing in the Usage section of this page:
http://rtfm.modx.com/display/revolution20/FILE+Binding

That was also reported at bugs.modx.com but I’m not exactly sure on the specific settings used..]]>
markh Jun 06, 2011, 10:14 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129947
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129946 markh Jun 06, 2011, 10:07 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129946 <![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129945

[[+gender:isequalto=`1`:then=`Male`:else=`[[+gender:isequalto=`2`:then=`Female`]]` ]]


and it did just then what it has done now ... returned this ...

Female`]]


And whether I choose female or male in the backend ... that’s what it gives me ...

Well your code [[+modx.user.id:userinfo=`dob`]] gave me a zero but I added the ’!’ then it worked perfectly. smiley Even with the output modifier.]]>
jobkingori Jun 06, 2011, 10:05 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129945
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129944 http://rtfm.modx.com/display/revolution20/FILE+Binding]]> lithiumlab Jun 06, 2011, 10:02 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=3#dis-post-129944 <![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129943
[[+userId]] isn’t set by default, the docs sort of assume people get that. Try replacing user with modx.user.id (so [[+modx.user.id:userinfo=`dob`]]

[[+gender:isequalto=`1`:then=`Male`:else=`[[+gender:isequalto=`2`:then=`Female`]]` ]]




Edit: Updated the docs.]]>
markh Jun 06, 2011, 09:40 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129943
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129942
[[+userId:userinfo=`dob`:date=`%Y-%m-%d`]]


I got a blank field on the page.

I know there is a way to do it ... its just the syntax and you know a small error makes the whole thing not work.

[[+numbooks:isequalto=`5`:then=`There are 5 books!`:else:isequalto=`4`:then=`There are 4 books!`:else=`Not sure how many books`]]

I tried something like the above and it didn’t work. How exactly are you suggesting I include the else?

Tried this also ...

[[+gender:isequalto=`1`:then=`Male`:else=[[+gender:isequalto=`2`:then=`Female`]] ]]


]]>
jobkingori Jun 06, 2011, 09:38 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129942
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129941
Anyway, if you’re going to work on such extensive conditionals you may be better of using the If or Switch snippets which make it a lot easier to maintain and will most likely pick up more performance in the process. When using output modifiers the entire class is loaded for each one, and while it’s no problem when just using one or two, you will start noticing some performance when using chains like that.

I’ve updated those docs myself some time ago based on the 2.1 source, but didn’t try out every example. If you can be a bit more specific on which one(s) you tried did not work, please let me know so I can fix that without having to spend ages on figuring that out...]]>
markh Jun 06, 2011, 09:25 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129941
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129940 http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+(Output+Modifiers) don’t work or the information is outdated/wrong ...

Also ... the conditinal modifiers might need more examples ...

[[+numbooks:isequalto=`5`:then=`There are 5 books!`:else=`Not sure how many books`]]


Especially on the formatting of the code so that if someone was to extend functionality to something else like

[[+numbooks:isequalto=`5`:then=`There are 5 books!`:isequalto=`4`:then=`There are 4 books!`:else=`Not sure how many books`]]


Output modifiers are very useful and a lot of people are having problems with it but are settling with writing their own prehooks and posthooks to try live with the problem.

Syntax is a big problem. Personally I keep getting errors when editing a specific example to cater to a specific problem. Example above.

Hope I’m making sense.
]]>
jobkingori Jun 06, 2011, 09:20 AM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129940
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129939
Also made minor changes to the Tag Syntax page.

Keep those reports coming people - the more reports are listed here, the easier it is for knowledgeable people to see what could do with more examples or clarifications when they have time!]]>
markh May 01, 2011, 05:56 PM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129939
<![CDATA[Re: Documentation (desperately?) needing improvement, examples etc.]]> https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129938

Thanks for the reports so far. laugh]]>
markh Mar 02, 2011, 06:23 PM https://forums.modx.com/thread/25314/documentation-desperately-needing-improvement-examples-etc?page=2#dis-post-129938