Jump to content

Create dynamic pages with GoLive


aricm
 Share

This topic is 7146 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm trying to create a page that draws from a Filemaker database. The database is already available a web server, and there is a page created with Claris Homepage that accesses it.

I would like to create a page that automatically displays detail information for the five newest records in the database. I have the CDML Tool and GoLive, but am having trouble coming up with a page that automatically accomplishes this search and displays the result info.

I have found several topics about setting up the database for web publishing, but I'd like to find out more about creating the actual pages. I have a copy of the main database locally on my computer, but the actual database and files are on a server to which I have FTP access.

Thanks for the help!

[ March 26, 2002, 05:54 AM: Message edited by: aricm ]

Link to comment
Share on other sites

You can use cdml to achieve this.

First you will need to query the database with either a 'url' or a 'form'. Then a 'format' file, containing cdml tags, will be returned. The cdml tags are replaced by data from the database.

An example of a 'format' file is:

code:


<html><head>...</head>

<body>

[FMP-Record]

Name: [FMP-Field: firstname] [FMP-Field: lastname]<br>

[/FMP-Record]</body>

A good place to start is the 'CDML Reference' database.

Hope this helps.

Garry

Link to comment
Share on other sites

Thanks for the reply, Garry. I've got a pretty good idea on how to set up the format file. I guess the gist of my question goes more to the URL or form used to access the data in the first place.

I need to be able to search for the five newest records in the database, which keeps track of creation date, and then immediately display the data from those records. The kicker, though, is that my client insists on not having a separate form page, which requires the user to click a button before viewing the results.

I've been hoping there is a type of URL to run the search and call the format file. Any ideas?

[ March 26, 2002, 05:22 PM: Message edited by: aricm ]

Link to comment
Share on other sites

Hi, here's how you can call it from a url:

http://mydomain.com:591/FMPro?-db=mydatabase&-format=thepage.htm&-error=thepage.htm&-lay=layout1&-sortfield=creation_date&-sortorder=descending&-max=5&-FindAll")

if it's your home page being delivered by a webserver, you'll have to use a redirect or frames.

Here's how to embed it into another FileMaker page as an inline action:

[FMP-InlineAction: -DB=mydatabase,-max="5",-sortfield=creation_date,-sortorder=descending,-FindAll]

[FMP-RECORD]

<TABLE BORDER=0 CELLSPACING=0 WIDTH=150>

<TR>

<TD>

<P><A HREF="http://mydomain.com:591/FMPro?-db=mydatabase&-format=record_detail.htm&-error=search_error.htm&-lay=layout1&-op=eq&recordkey=[FMP-FIELD:recordkey]&-find">[FMP-FIELD: title]</A></P>

</TD>

</TR>

<TR>

<TD BACKGROUND="images/linebg.gif">

<P><IMG SRC="images/lineshimh.gif" WIDTH=10 HEIGHT=1 ALIGN=bottom></FONT></P>

</TD>

</TR>

</TABLE>

[/FMP-RECORD][/FMP-InlineAction]

In both cases, I'm cheating on the search, because I'm using 'findall' but just displaying the latest five, but that really shouldn't matter unless you have a *lot* of records.

regards, jeff

PS: that long link string in the inline could just be a 'LinkRecID'

Link to comment
Share on other sites

This topic is 7146 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.