Article

Get Started with Dynamic Data in GoLive

Page: 1 2 3 4 Next

Step 3. Going Dynamic

You'll now use the Dynamic Site Wizard in GoLive to make your site dynamic.

1026_wizard

From the Site menu, choose Settings > Dynamic Content > Dynamic Site Wizard. Set the server language (ASP in this example, but you may have chosen PHP or JSP). Your server connection is most likely FTP (file transfer protocol), but it could also be WebDav or Site Is Served Locally if you run a Web server, including those shipping with GoLive 6.

If you'll use FTP and your settings aren't already established, create a connection under the FTP pop up menu, Edit Server, using the information provided by your ISP (ask them for it if you don't have it). Next, the Wizard will prompt you for the URL root of your site. This is simply the address of the home page for this test site; e.g. http://www.mysite.com/test.

1026_settingsNow the Wizard will ask what Security Options you want. GoLive automatically identifies your current IP address and will allow that address unrestricted access to the site files. If you're on a dial-up modem, however, your IP address is different each time you dial in. In this case, select "Allow Anyone," which ensures you can access and edit the site for now. You can adjust the security options later when you're ready to launch.

GoLive makes use of IP authorization to prevent unauthorized individuals from tampering with your files. You'll find a file in your config folder in which you can "include friends" by listing trusted IP addresses. You can open this file (e.g. config > include > friends.asp or similar) in a text editor at any time after the site has been made dynamic to see the instructions on adding other friendly IP addresses, and disabling IP authorization altogether.

Skip the Wizard's final question on Data Sources for now -- we'll get to that momentarily. Enter Finish on the last screen of the Wizard, and guess what... your site is now dynamic!

At this point, GoLive has automatically uploaded test files and performed a server check. If GoLive detects any problems, it will notify you, and you can back up to the point in the process where the correction needs to take place.

Step 4. What is a Data Source?

If you're working with dynamic data for the first time, you may be wondering what the difference is between a "database," a "data source," and a "content source." They're not necessarily interchangeable, so a brief explanation will help.

Database: this file contains your data organized into one or more tables. Our sample is a Microsoft Access file (.mdb), but you may have chosen to work with Microsoft SQL Server (ASP), Oracle 8 (ASP), MySQL 3.23 (PHP and JSP), or Oracle 9 (JSP).

Data Source: this file points to a database and tells your site how to access it. You create a Data Source in the Dynamic Content area of the Site Settings. GoLive then places the Data Source file in the config > datasources folder of your Dynamic Site.

If your Microsoft Access database is not password-protected, as in this example, the database itself acts as the Data Source and you don't have to create a separate one. You're more likely to want to password-protect your database in a real life situation, so we'll make a separate Data Source for it below.

Content Source: this is a query from your dynamic page to a database in order to provide content for that page. Pages can have multiple Content Sources that provide different content for that page. For instance, you'll be creating Content Sources (queries) that return all records, or return only records with certain criteria, like only those records with a last name starting with "T".

Adding a Content Source means you're telling GoLive: "please look in table 'x' of database 'y', and pull out all records that match my filter requirements so I can have that data available as content for this page." To add a Content Source, you just drag and drop a Content Source object from the Dynamic Content palette in the head section of a page.

Identify your Data Source

Now you need to tell GoLive what Data Source your site will use. If you have an Access database, you could just take your .mdb file and move it into the config > datasources folder, and you'd be done. If your .mdb file is password-protected, however, you'll want to use the procedure that follows.

If you're using a password protected Access database or MySQL, it's not hard to create a Data Source. Just go to the Site menu and choose Settings > Dynamic Content. In the Data Sources area click New. Then choose the type of Data Source you'll use (e.g. ADO Database, MySQL database, etc.). In the Data Source editor, give the Data Source a name first. The Data Source does not need to be given the same name as the database file itself, but it may be easier to name it the same way in order to avoid confusion. GoLive will add the proper file extension to the name you provide.

Next, give it the URL where the database exists on your Web server, and tell it the name of the database itself. You also need to tell it the username and password needed to access the database. That's it! If you have any questions here, pages 382-385 of the GoLive 6.0 manual can answer them.

1026_adddata

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links