Re: howto build an own categories-checkbox-list?

Silvan Zurbruegg <[email protected]>
Newsgroups gmane.comp.cms.bitflux.general
Message-ID <[email protected]>
Hi Alain

>
> i am trying to build a linkeditor.
>
> i already have a small form to insert a new link (it does nothing yet, 
> exept for displaying print_r($data) when sending the form).

There is a sub-editor for the bloglinks called `blogroll'
(in inc/bx/editors/blog/sub/blogroll.php with the xsl from
inc/bx/editors/blog/sub/xsl/blogroll.xsl). In this case,
the subeditor plugin generates the bloglinkscategories,
and you don't need to use a stream for that.

>
> could you explain to me how i am supposed to set up something like 
> this. i have understood, that you registred a stream called "blog://" 
> where you seem to call:
> document(concat('blog://',$collectionUriOfId,'categories.xml'))
> at least in post-fck.xsl
>

 but, oehm. i dont really get the scene behind that. i would like about 
a  similar "checkbox-list" for the links. Is it the best if i register 
an own "stream" and if yes, what are the steps to do so? If no, what 
would be the alternatives?


if you want to use a stream, you could create your own in
inc/bx/streams. The portlet stream is quite comprehensible
and easy to use as a template. All streams basically extend
bx_streams_buffer and have to implement a contentOnRead()
and a contentOnWrite() method. Don't forget to register
your stream with bx_global::registerStream($streamname);
before using it.

My guess is that if you can handle  input/output to/from your linkeditor
from within the same plugin, you don't need a stream. If other components
need to access your linksplugin (especially for writes), a stream
could be useful.


HTH+best
silvan

 

-- 
bitflux-cms mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bitflux-cms
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.