
Damon
Staff
/ Moderator

Oct 10, 2002, 9:19 AM
Post #1 of 3
(3062 views)
Shortcut
|
|
How to Create Handheld Friendly Content
|
Can't Post
|
|
Hi, I compiled a few previous post into this one post to explain how to create Handheld friendly content or email newsletter ready content. The steps are similar the same for each. Here it is: I previously tried using the WebFeed Generator to create handheld content and adding it to my handheld using the Avantgo.com service but I was unsuccessful - content doesn't appear because of JavaScript :( So after brainstorming for a while I found a solution :) Instead of using the WebFeed Generator, I created a custom article index template. Then pulled up the article results using that custom template via a search query. Here is my steps: 1. Download the /templates/index/default.html template. Make a backup. Copy it and save it as handheld_default.html (or whatever you prefer to call it). 2. Modify the handheld_default.html template to only publish the content you want to include for the handheld version. So for example, strip out the top section, left navigation and right latest headlines section. Maybe even add a separate smaller graphic at the top. 3. Save changes and upload to the /templates/index/ directory. Note: Make sure that you have no JavaScript in the customized handheld template or parts of the page may not appear on the handheld. Here is an example of the URL that will bring up the article results with the customized email template that can be emailed out: http://www.yoursite.com/cgi-bin/artman/exec/search.cgi?perpage=5&template=index/handheld_default.html If you only want to make available articles from one category, use a similar URL with the addition of the category number. Here is an example: http://www.yoursite.com/cgi-bin/artman/exec/search.cgi?cat=3&perpage=5&template=index/handheld_default.html 4. Instead of having a long search query URL for users to link to or add to Avantgo as a custom channel, what I did was create a separate static page that will include the handheld search results using a Server Side Include. 5. Created a new directory and page to publish the static handheld friendly page. Example: http://www.yoursite.com/handheld_friendly/index.shtml 6. In the index.shtml page I added a Server Side Include to pull in the handheld friendly page search results. Example: <!--#include virtual="/cgi-bin/artman/exec/search.cgi?start=1&perpage=6&template=index/handheld_default.html" --> And that's it. The handheld friendly results should now be published to the /handheld_friendly/index.shtml. Now this page can be used for Avantgo to add a Custom Channel. One thing to note is that I'm on a Unix server so the SSI may be slightly different on a Windows server. 7. Article Links: To link the headlines of the articles in your published Handheld friendly index to Handheld friendly full article pages you can make use of the printer pages that are already generated for each article. In your customized Handheld friendly template, replace: <!-- template insert : $article_list$ --> <!-- templatecell : row --> <font class="artname"><a href="$detail_link$">$art_name$</a></font><br> with <!-- template insert : $article_list$ --> <!-- templatecell : row --> <font class="artname"><a href="$art_printer_url$">$art_name$</a></font><br> This will link the headline to the printer page instead of the regular article page. The printer pages are great to use because by default they don't include additional navigation which you wouldn't want on the Handheld. Note: Make sure that you have no JavaScript in your printer pages (like the page break add-on) or the printer page content won't appear on the Handheld. Whew! :) Well, that's it. I hope that helps. If you come across any tips of your own, let me know. --------------------------------------------------- Cheers Damon Edis interactivetools.com Hire me! Save time by getting our experts to help with your project. http://www.interactivetools.com/consulting/
(This post was edited by Damon on Oct 10, 2002, 9:20 AM)
|