Re: doctypes
Christian Stocker <[email protected]>
| Newsgroups | gmane.comp.cms.bitflux.general |
|---|---|
| Organization | Bitflux GmbH |
| Message-ID | <[email protected]> |
On 29.11.2005 11:33 Uhr, qMax wrote:
> Thursday, November 24, 2005, 3:14:27 PM, Christian Stocker wrote:
> CS> For the desicion of which stylesheet should be used, you can implement the
> CS> public function getStylesheetNameById($path = NULL, $id = NULL) {}
> CS> method in the new plugin and return an stylesheet according to the
> CS> doctype. I don't know, how lenya does it, but I would suggest you just
> CS> return $doctype.'2html.xsl' for each different doctype. otherwise we
> CS> need a central place for defining which xslt should be used for which
> CS> doctype. We still can extend that later to make it more advanced.
> Is this metod used automagically, or i should configure some pipeline
> explicitely ?
Ooops. I thought that's called, but it isn't. only in the admin pipeline.
What actually happens is.
- we call $collection->getPipelineProperties() in
bx/popoon/components/action/bxcms.php
- this returns the xslt name from .configxml in
<parameter name="xslt" type="pipeline" value="static.xsl"/>
which is then available as {xslt} map parameter in the pipeline
that value is received with
$params = array_merge( $params, $this->config->getParameters("pipeline"));
in public function getPipelineProperties()
So, there's currently no way of getting dynamic xslts via a plugin, as
the plugin itself is never dynamically called for so called pipeline
properties. Only what's in .configxml and the properties table is
returned here. We could add something like
***
$a = array_merge($a,$collection->getPipelineProperties());
if(($xslt =
$collection->getStylesheetNameByRequest($filename, $ext)) !== NULL) {
$a['xslt'] = $xslt;
}
***
which is in bx/popoon/components/action/bxcmsadmin.php, but we have to
differentiate between admin and public mode here.
> Then i probably need also getPipelineName to return this specific
> pipeline, handling various doctypes.
> I still miss how to use resource properties or plugin methods inside pipelines.
If you could dynamically define the used stylesheet, you're maybe happy
with the standard pipeline for html output. Maybe you don't need your
own pipeline here.
>>>== for specific content editor, with some forms, buttons and whistles:
>>>bx_editors_fooedit, ext bx_editor
>
>
> CS> Editors are "doctype" independent, so you could basically just use the
> CS> BXE or oneform editor for your files. or write your own, of course.
> For some strictly structured doctypes (calendar event, task shedule, user profile,
> etc) it is probably better to have spelicized form-editor.
> For text-style doctypes (like docbook), i will need to do tribal dance
> to set up BXE to handle new schema.
> Still dunno how.
Have a look at bx/editors/links.php, that should give you a hint for a start
chregu
>
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected] | GPG 0x5CE1DECB
--
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms