[dokusite] Chapter Object: 1.4.1.2: Form -- Continued
"Roger Fischer" <[email protected]>
| Newsgroups | gmane.comp.cms.bitflux.general.german |
|---|---|
| Message-ID | <[email protected]> |
1.4.1.1. Database
1.4.1.2. Form
1.4.1.3. Structure XML
1.4.1.4. XSL Stylesheet
1.4.1.1 Form
============
- Location of the config.xml
- index.php
- config.xml
- Explanations concerning the config.xml
- Changes in head area
- Changes in navigation area
[continued...]
Changes in head area
--------------------
Right now if everything works fine, you can type:
http://$SITE_NAME/admin/form/Chapter/
and you should see the form you created with the config.xml
*Chapter as an element in the head area*
But now you want also to find it in the head area under Elements where all
the other Tables are as well.
To do this you have to go:
$PROJECT_DIR/www/admin/power/header
and open the file index.php
On Top you find the elements-array. Just add Chapter and any other Object
you have created, so that the array looks like this:
<?php
include("bitlib/admin/auth/common.php");
session_start();
$elements =
array("Section","Document","Article","Chapter","Mediaobject","Imageobject","
File","Faq");
$projectName ="NBWZ";
?>
If you go back to the Power User Admin Interface, you'll find Chapter
together with other elements like Article, Mediaobject, etc.
Changes in navigation area
--------------------------
Normally you create first a document and you then add the objects you want.
So naturally we also want that "Add Chapter" appears when we left-click the
Document Icon to add a Chapter.
To do this you have to go:
$PROJECT_DIR/www/admin/power/navi
We find two files there:
- index.php
- structure.xml
*index.php*
You don't have to do anything with the index.php file, just leave it like it
is.
*structure.xml*
structure.xml has another namespace (see for namespaces above) as well as
another prefix.
<?xml version="1.0"?>
<bxst:structure xmlns:bxst="http://bitflux.org/structure/1.0">
<bxst:section name="tree" recursive="tree">
<bxst:table name="Section" fields="title_de , ID , uri ,
foreignsectionid , sectionalias" titletag="title_de"/>
</bxst:section>
<bxst:section name="page" orderby="Document.rang Desc">
<bxst:table name="Section" allowsub="yes" showview="yes"
fields="title_de , ID , sectionalias" titletag="title_de">
<bxst:table name="Section2Document"
thisfield="foreignsectionid" thatfield="sectionalias" nofields="yes">
<bxst:table name="Document" thatfield="foreigndocumentid"
showview="yes" fields="title , ID">
<bxst:table name="Document2Object"
thisfield="foreigndocumentid" objectfield2="objectname" nofields="yes"
bgcolor="#003366">
<bxst:table showview="yes" showeditwysiwyg="yes"
name="Article" thatfield="foreignobjectid" langtag="lang" titletag="title"
bgcolor="#002244" fields="lang , title , ID" />
<bxst:table showview="yes" name="File"
thatfield="foreignobjectid" langtag="lang" titletag="fileinfo_title"
bgcolor="#002244" fields="lang , fileinfo_title , ID" />
<bxst:table showview="yes" name="People"
thatfield="foreignobjectid" langtag="firstname" titletag="surname"
bgcolor="#002244" fields="surname , firstname , ID" />
<bxst:table name="Mediaobject"
thatfield="foreignobjectid" titletag="objectinfo_title" fields="ID,
objectinfo_title">
<bxst:table name="Imageobject"
thisfield="foreignmediaobjectid" titletag="imagedata_fileref" fields="ID,
imagedata_fileref"/>
</bxst:table >
</bxst:table>
</bxst:table>
</bxst:table>
</bxst:table>
</bxst:section>
</bxst:structure>
Just add the following line after Article:
<bxst:table showview="yes" showeditwysiwyg="yes" name="Chapter"
thatfield="foreignobjectid" langtag="lang" titletag="title"
bgcolor="#002244" fields="lang , title , ID" />
so that the structure.xml looks like this
<?xml version="1.0"?>
<bxst:structure xmlns:bxst="http://bitflux.org/structure/1.0">
<bxst:section name="tree" recursive="tree">
<bxst:table name="Section" fields="title_de , ID , uri ,
foreignsectionid , sectionalias" titletag="title_de"/>
</bxst:section>
<bxst:section name="page" orderby="Document.rang Desc">
<bxst:table name="Section" allowsub="yes" showview="yes"
fields="title_de , ID , sectionalias" titletag="title_de">
<bxst:table name="Section2Document"
thisfield="foreignsectionid" thatfield="sectionalias" nofields="yes">
<bxst:table name="Document" thatfield="foreigndocumentid"
showview="yes" fields="title , ID">
<bxst:table name="Document2Object"
thisfield="foreigndocumentid" objectfield2="objectname" nofields="yes"
bgcolor="#003366">
<bxst:table showview="yes" showeditwysiwyg="yes"
name="Article" thatfield="foreignobjectid" langtag="lang" titletag="title"
bgcolor="#002244" fields="lang , title , ID" />
<bxst:table showview="yes" showeditwysiwyg="yes" name="Chapter"
thatfield="foreignobjectid" langtag="lang" titletag="title"
bgcolor="#002244" fields="lang , title , ID" />
<bxst:table showview="yes" name="File"
thatfield="foreignobjectid" langtag="lang" titletag="fileinfo_title"
bgcolor="#002244" fields="lang , fileinfo_title , ID" />
<bxst:table showview="yes" name="People"
thatfield="foreignobjectid" langtag="firstname" titletag="surname"
bgcolor="#002244" fields="surname , firstname , ID" />
<bxst:table name="Mediaobject"
thatfield="foreignobjectid" titletag="objectinfo_title" fields="ID,
objectinfo_title">
<bxst:table name="Imageobject"
thisfield="foreignmediaobjectid" titletag="imagedata_fileref" fields="ID,
imagedata_fileref"/>
</bxst:table >
</bxst:table>
</bxst:table>
</bxst:table>
</bxst:table>
</bxst:section>
</bxst:structure>
Now upload your files and then visit:
http://$SITE_NAME/admin
and you will now find Chapter in all three areas: head, navigation, editing.