Example One | Just an example ... |
Improvements in VWcms![]() This Endless Software Solutions website, is maintained using the web content management system, VWcms (pronounced vee-dub). VWcms is a software packaged developed and maintained by Mark Daniel, the author of the WASD web server software. The software is of an excellent standard and Mark's support has always been great. Recently I was putting together an upcoming blog entry that makes rather extensive use of the
$$IF$!cgi=WWW_FORM_TEST$$
<some_html/> $$ELSE$$ <other_html/> $$ENDIF$$ After some fiddling around I discovered that the value for the CGI variable TEST would default to an empty string. So, even when the variable was not present in the URL it would always appear as if it had, just without a value. I corrected this and it is now possible to test for the presence of a CGI variable as decribed by the documentation. While fiddling around in this code I decided that it might be a good idea to add support for some other operators to the "cgi=" parameter. In the official release it is only possible to specify "=" which actually performs a substring match rather than a test for equality. For example, the following piece of code will match when INDEX is both "1" and "11".
$$IF$cgi=WWW_FORM_INDEX=11$$
<matched/> $$ENDIF$$ I have altered this behaviour for my patch. Although I have not noticed any erratic results there may be something lurking in the depths and your mileage may vary. However, it is now possible to compare the CGI variable value with a static string using the following operators:
*All comparisons are case insensitive. Lastly, on Mark's suggestion I also applied a call to PatchI have constructed a patch based on the V0.94 release of VWcms.
This patch was created using the DCL command
$ EDIT/SUM HT_ROOT:[SRC.VWCMS]TEMPLATE.C/UPDATE=ddcu:[dir]TEMPLATE.DIF
|
|||||||||||||||||||||||||||
As at: Friday, 27 June 2025 14:46 Updated: Monday, 19 May 2014 11:41 (11 years ago) |