1. Learn WebDNA Programming
Learning WebDNA programming: the very basics.
First, you need a webserver. Most modern operating systems include a webserver. On a Mac, activate it with "Sharing > Web Sharing". Then install WebDNA FastCGI.
Confirm that everything went fine by linking to http://localhost/webdna/
The admin login and password is admin:admin
If you don't have one, get a free WebDNA Developer Edition license at http://dev.webdna.us/products.html
Once installed as a module for the webserver, WebDNA looks for two things:
- the .dna extension for your WebDNA pages
- The html comment <!--HAS_WEBDNA_TAGS--> at the top of your WebDNA pages
Is this mandatory? No, you can override these requirements in the settings. But for now, let's use .dna as the extension and put <!--HAS_WEBDNA_TAGS--> at the top of the pages.
A basic WebDNA tag is [date]. Note the syntax: the WebDNA language is built to understand square brackets.
Create a page named "test.dna" in your root webserver (on a Mac, this is /Library/WebServer/Documents/) and enter the following code:
That's it! Using your browser, call your local server with this address:
You should see today's date.
Simple, isn't it? What if you want another date format? Try this: [date %A, %B %d, %Y]. This will show the day, month, date and year in the format of Thursday, August 14, 2012. You will find all the date formats here
Try [time] too...
>>> Next page...