x
 
Create New Page
 View Previous Changes    ( Last updated by openmk )

Access Key Links in Weblog Entries for Cell Phone Browsing

I decided to create some ExpressionEngine templates designed for viewing on Cell Phones, Mobile Phones, PDA’s, etc. One of the things needed was to be able to specify the “accesskey” values in the html links so that the numbers 0-9 on a cell phone keypad could be used to select links. A suggestion on the EE forums was to use the “count” EE tag to generate the accesskey values as needed.

For a Table of Contents like listing I used the following code:

{exp:weblog:entries orderby="edit_date" sort="desc" limit="8" category="8" weblog="{my_weblog}" dynamic="off" disable="pagination|custom_fields|categories|member_data|trackbacks"}

<div class="navItem"><span class="accesskey">{count} • <a href="{title_permalink={my_template_group}/read}" accesskey="{count}">{title}</a></span><p class="small">by {author}</p></div>

{/exp:weblog:entries}

One convention for a lot of designed-for-Mobile sites seems to be to use the number 0 for “Home” and the number 9 for “Next” and “Previous” or “Back” so I limited my weblog entries to 8. At some point it would be nice to figure out a way to do pagination for more than 8 weblog entries.

Category:HowTo
Category:Coding
Category:Templates
Category:Mobile