in a German thread knollsen has sugested to add an optional parameter to the template tag top() to be able to choose another ID instead of TOP. IMO that would be a nice and kompatible improvement.
I suggest the following patch:
Code: Select all
Index: cmsimple/tplfuncs.php
===================================================================
--- cmsimple/tplfuncs.php (revision 1480)
+++ cmsimple/tplfuncs.php (working copy)
@@ -632,17 +632,19 @@
/**
* Returns a link to the top of the page.
*
- * To work, an anchor TOP has to be defined in the template.
+ * To work, an appriate ID has to be defined in the template.
*
+ * @param string $id An (X)HTML ID.
+ *
* @return string (X)HTML.
*
* @global array The localization of the core.
*/
-function top()
+function top($id = 'TOP')
{
global $tx;
- return '<a href="#TOP">' . $tx['navigator']['top'] . '</a>';
+ return '<a href="#' . $id . '">' . $tx['navigator']['top'] . '</a>';
}