|
|
|
|
|
|
|
|
Create your own Windows CE Mobile Channel (continued)
Once again, the TITLE tag is the name of the title as shown on the device. The Craig’s displays a proper apostrophe in my article's title.
Here's how those elements go into my CDF code:
<CHANSCRIPT VALUE="CP-INDEX"/>
<TITLE>Craig’s Channel</TITLE>
<ITEM HREF="cpindex.html" ID="CP-INDEX"> <USAGE VALUE="None"/></ITEM>
|
The rest of the CDF story
In a Mobile Channel, you don't directly reference the file name of the document. Instead, you call it by its ID tag. To avoid confusion for me, I've made my ID tags very similar to the actual HTML file names. The line above that starts <ITEM HREF="cpindex.html" ID="CP-INDEX"> means that whenever I refer to the ID named CP-INDEX it will display the item or page from the file CPINDEX.HTML, specified on the same line.
The following lines describe the remaining pages in my channel. They also need to be in my Channel Definition File. They all have the file name (the HTML files), and individual ID names. They also have a USAGE VALUE ="MobileData" which informs the device that these items should be made available on your mobile device.
<ITEM HREF="cpchannel.html" ID="CP-CHANNELS"> <USAGE VALUE="MobileData"/></ITEM>
<ITEM HREF="cpsware.html" ID="CP-SWARE"> <USAGE VALUE="MobileData"/></ITEM>
<ITEM HREF="cphware.html" ID="CP-HWARE"> <USAGE VALUE="MobileData"/></ITEM>
<ITEM HREF="cptips.html" ID="CP-TIPS"> <USAGE VALUE="MobileData"/></ITEM>
<ITEM HREF="cpnews.html" ID="CP-NEWS"> <USAGE VALUE="MobileData"/></ITEM>
<ITEM HREF="cpabout.html" ID="CP-ABOUT"> <USAGE VALUE="MobileData"/></ITEM>
<ITEM HREF="cpbest.html" ID="CP-BEST"> <USAGE VALUE="MobileData"/></ITEM>
</CHANNEL>
|
Inside a channel's HTML file That about wraps up our channel definition file. Now, lets take a look at one of the HTML files mentioned above. The first one we'll look at is the Hardware page, contained in the CPHWARE.HTML file. Fortunately, we're no longer doing the arcane CDF coding. Most of the rest is typical HTML, just tuned for a mobile channel's use.
The first few lines say the file is an HTML file and defines its title:
<html>
<head>
<title>Craig's PPC Hardware Page</title>
</head>
|
Next, I'll set the background color to white. This is another cool Mobile Channels tip. If you set the background color to white, you can pretty well guarantee your page will be viewable on all devices. Here's that code (note that #FFFFFF) is the HTML descriptor for white:
|
|
|
|
|
|
|
|
|
|
|