.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ==================== EXT: Auto Accesskeys ==================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Ernesto Baschny :Changed: 2005-08-10T13:00:33 :Author: Ernesto Baschny :Email: ernst@cron-it.de :Info 3: cron IT GmbH :Info 4: .. _EXT-Auto-Accesskeys: EXT: Auto Accesskeys ==================== Extension Key: **cron\_printlink** Copyright 2005, Ernesto Baschny, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: Auto Accesskeys 1** **Introduction 1** What does it do? 1 **Users manual 1** **Adminstration 1** **Configuration 2** **Known problems 2** **To-Do list 3** **Changelog 3** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ With this extention you can automatically generate “accesskeys” to the navigational Tags for your TMENU's based on the title of the menu item. The first not yet used character of the title will be used as an accesskey. Optionally you can wrap something around the first occurence of the accesskey in the title, so you can easily simulate Windows-like menus (underlined accesskey). This also works together with gov\_accesskey, in that if an accesskey is defined for an page (field “accesskey”), it will be used instead of auto-generating one. .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-1| .. _Users-manual: Users manual ------------ The user don't need to do anything. If the gov\_accesskey extention is installed, the user that adds content should fill the “accesskey” for a page only if he wants the accesskey to be statically set (i.e. not automatically generated from the title). Otherwise, just leave that field empty. .. _Adminstration: Adminstration ------------- If you want users to be able to override accesskeys manually, install gov\_accesskey. The user will be able to override the accesskey per page. To use the auto-generation, just install the cron\_autoaccesskeys extention and add a call to “user\_cronautoaccesskeys->addAccessKeys” on the TMENU's IProcFunc. .. _generated: ((generated)) ^^^^^^^^^^^^^ .. _EXAMPLE: EXAMPLE """"""" Generates a nested list menu: :: temp.listMenu = TMENU temp.listMenu { wrap = noBlur = 1 IProcFunc = user_cronautoaccesskeys->addAccessKeys NO { allWrap =
  • |
  • stdWrap.htmlSpecialChars = 1 ATagParams = accesskey="{field:tx_govaccesskey_accesskey}" tabindex="{field:tx_govaccesskey_tabindex}" ATagParams.insertData = 1 } ACT = 1 ACT { wrapItemAndSub =
  • |
  • } RO = 0 } This will generate a menu. Each A-Tag will get an “accesskey”. First the accesskey from gov\_accesskey will get used. If this is empty (“”), the cron\_autoaccesskey extention will generate the accesskey on its own. .. _Configuration: Configuration ------------- The IProcFunc can be configured with the following options: .. ### BEGIN~OF~TABLE ### .. _accessKeyWrap: accessKeyWrap ^^^^^^^^^^^^^ .. container:: table-row Property accessKeyWrap Data type wrap Description The first occurrence of the accesskey in the title will get this wrap wrapped around it. Useful to highlight the accesskey of a menu item. **Example:** :: temp.listMenu = TMENU temp.listMenu { .. IProcFunc = user_cronautoaccesskeys->addAccessKeys IProcFunc.accessKeyWrap = | .. } Default .. _appendWrap: appendWrap ^^^^^^^^^^ .. container:: table-row Property appendWrap Data type wrap Description This will get appended to the title, wrapping around the used accesskey. **Example:** :: temp.listMenu = TMENU temp.listMenu { .. IProcFunc = user_cronautoaccesskeys->addAccessKeys IProcFunc.appendWrap =  (ALT- | ) .. } Default .. _forbiddenKeys: forbiddenKeys ^^^^^^^^^^^^^ .. container:: table-row Property forbiddenKeys Data type string Description A comma separated list of characters that should never be used in auto-generated accesskeys. This is useful if you already have a couple of accesskeys being used in your main template and don't want other menu items to use them (e.g. ALT-0 to go to the start page). **Example:** :: temp.listMenu = TMENU temp.listMenu { .. IProcFunc = user_cronautoaccesskeys->addAccessKeys IProcFunc.forbiddenKeys = 0,D,B,A,F,X .. } Default .. ###### END~OF~TABLE ###### .. _generated: ((generated)) ^^^^^^^^^^^^^ .. _generated: ((generated)) """"""""""""" .. _Examples: Examples ~~~~~~~~ This will generate a simple page with a link to its print version: :: temp.listMenu = TMENU temp.listMenu { wrap = noBlur = 1 IProcFunc = user_cronautoaccesskeys->addAccessKeys IProcFunc.accessKeyWrap = | IProcFunc.appendWrap =  (ALT- | ) IProcFunc.forbiddenKeys = 0,D,B,A,F,X NO { allWrap =
  • |
  • stdWrap.htmlSpecialChars = 1 ATagParams = accesskey="{field:tx_govaccesskey_accesskey}" tabindex="{field:tx_govaccesskey_tabindex}" ATagParams.insertData = 1 } ACT = 1 ACT { wrapItemAndSub =
  • |
  • } RO = 0 } Here, the current accesskey will be highlighted in the title (CSS- class “accessKey”) and an accessible text will be appended to the title (ALT-). The keys 0, D, B, A, F, X will never be used for auto-generating, only if the user explicitly set them with gov\_accesskey. .. _Known-problems: Known problems -------------- If you override an accesskey with gov\_accesskey later in the menu, it might already have been used, so it will be double-booked. .. _To-Do-list: To-Do list ---------- Nothing so far .. _Changelog: Changelog --------- - 0.1.0: First public version - 0.2.0: - Added forbiddenKeys option - Will now render the accesskey provided by gov\_accesskey, if one is set. So you now don't need to patch TYPO3 anymore to get accesskeys working. |img-2| EXT: Auto Accesskeys - 3 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 292 .. :id: Grafik1 .. :name: Grafik1 .. :width: 163 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102