Hi, I got a few comments to midcom-template.xml:

a) As midcom-template shows how to implement a midcomsite, it should use
style-init instead of ROOT as it's root element.

b) Also, it should use midcom_show_style("/path/to/element-name");
instead of <(element)>.

c) Midcom-template has been implemented without the $GLOBALS array. This
breaks some instalations, depending on the settings in php.ini. The
attached patch fixes this.


Any comments?
Tarjei

Index: midcom-example.xml
===================================================================
RCS file: /cvs/midcom/examples/midcom-example.xml,v
retrieving revision 1.25
diff -u -r1.25 midcom-example.xml
--- midcom-example.xml	29 Mar 2004 18:13:12 -0000	1.25
+++ midcom-example.xml	12 Apr 2004 16:24:16 -0000
@@ -57,7 +57,7 @@
   <title><(page-title)></title>
   <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-latin-1">
   <meta HTTP-EQUIV="Content-Language" CONTENT="EN">
-  <link href="&(midcom_site["uri"]);style.css" rel="stylesheet" type="text/css">
+  <link href="&(GLOBALS['midcom_site']["uri"]);style.css" rel="stylesheet" type="text/css">
     <style type="text/css">
     <!--
     <(css-extra)>
@@ -69,7 +69,7 @@
   <table border="0" width="750" cellspacing="0" cellpadding="0" align="center" class="bordered">
     <tr>
       <td colspan="2" class="header">
-        <p><a href="&(midcom_site['uri']);" class="sitetitle">&(midcom_site['site_title']);</a></p>
+        <p><a href="&(GLOBALS['midcom_site']['uri']);" class="sitetitle">&(GLOBALS['midcom_site']['site_title']);</a></p>
       </td>
     </tr>
     <(content-row)>
@@ -595,18 +595,18 @@
 	<changed>2003-11-10</changed>
 	<name><![CDATA[template_midcom]]></name>
 	<content><![CDATA[<?php
-if (!$midcom_site['initialization_failed']) {
+if (!$GLOBALS['midcom_site']['initialization_failed']) {
   $midcom->content();
 } else { ?>
 <h1>Site initialization failed</h1>
 
 <p>
 Data initialization for this site is incomplete. Current status is:
-&(midcom_site['initialization_error']);
+&(GLOBALS['midcom_site']['initialization_error']);
 </p>
 
 <p>
-Proceed to <a href="&(midcom_site['uri']);midcom-admin/init/">System initialization</a>.
+Proceed to <a href="&(GLOBALS['midcom_site']['uri']);midcom-admin/init/">System initialization</a>.
 </p>
 <?php } ?>]]></content>
 </page>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to