[Rt-commit] r3526 - in rt/branches/3.5-TESTING: . html/Elements

trs at bestpractical.com trs at bestpractical.com
Mon Jul 25 06:26:03 EDT 2005


Author: trs
Date: Mon Jul 25 06:26:02 2005
New Revision: 3526

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Elements/Header
Log:
 r5385 at wintermute:  tom | 2005-07-24 22:46:48 -0400
 Per component CSS IDs for very specific styling


Modified: rt/branches/3.5-TESTING/html/Elements/Header
==============================================================================
--- rt/branches/3.5-TESTING/html/Elements/Header	(original)
+++ rt/branches/3.5-TESTING/html/Elements/Header	Mon Jul 25 06:26:02 2005
@@ -72,7 +72,7 @@
     --></script>
 <& /Elements/Callback, _CallbackName => 'Head', %ARGS &>
   </head>
-  <body>
+  <body<% $id && qq[ id="comp-$id"] |n %>>
 
 % if ($ShowBar) {
 <div id="quickbar">
@@ -97,6 +97,14 @@
 <%INIT>
 $r->headers_out->{'Pragma'} = 'no-cache';
 $r->headers_out->{'Cache-control'} = 'no-cache';
+
+my $id = $m->request_comp->path;
+$id =~ s|^/||g;
+$id =~ s|/|-|g;
+$id =~ s|\.html$||g;
+$id =~ s|index$||g
+    if $id ne 'index';
+$id =~ s|-$||g;
 </%INIT>
 
 <%ARGS>


More information about the Rt-commit mailing list