[Zope] KnowledgeKit HowTo?

Bruce Elrick belrick@home.com
Tue, 02 Nov 1999 10:39:57 -0700


Bill Anderson wrote:
> 
> Sorry for the dela yin response, my Grandfather passed on last week
> after a long bout with Cancer, so I was otherwise occupied.
> 
> But I am back. :-)

I'm sorry to hear that.


> > I installed the product as well as the example.  I created my own KB and
> > successfully added two sub-FAQs.  I also made the following simple change.
> >
> > In the KnowledgeKit area in the Products page I renamed the index_html
> > DTMLmethods that were in KBase, KBEntry, FAQBase, FAQEntry to the name "body"
> > and removed the standard_html_header/footer for the method.  The rest of my
> > Zope site acquires index_html from the root folder (except in exceptional
> > circumstances) and that DTMLmethod acquires "body" from wherever it is being
> > viewed.  This works like a charm and the KBase and entries have the look and
> > feel of my site.
> >
> > My standard_html_header/footer do not have all the stuff to create the look of
> > my site, which is when I made this change.  Included in my index_html is some
> > navigation code (actually, I'm current using the breadcrumb code).
> 
> Hmmm an interesting design ... so you have an index_html in the main
> folder, which contains the site design, and a tag along the lines of
> <dtml-var body> in the subfolders that is the 'index.html' for that
> subfolder, right?

Really, it could be done putting all that stuff in the standard header/footer,
I just started out leaving only headerish stuff (for example, a <link="blah"
type="text/css"...>) in there and doing it this way.  A result of discovering
acquisition.  Now that I look back, I do have more non headerish stuff in
there now.  Maybe I will change it, now that I'm having to modify products to
fit it into my scheme. :-)


> 
> If so, I have a question. :-)
> What does this get you that standard_html_[footer|header] included in
> index_html does not?
> 

Not much, upon reflection...

> >
> > My questions are numerous, but I'll only ask a few here.
> >
> > With respect to this product, how is one expected to add entries?  I know I
> > can pop into the manage page and then I have the usual Zope page for adding
> > objects.  In fact, my navigation code in my index_html uses:
> >     <dtml-if "AUTHENTICATED_USER.has_permission('Edit', this())">
> >          <a href="manage_main">Edit page</a>
> >     </dtml-if>
> > which gives me something to click on to get there.  However, I have two
> > problems with this.  One is the look of the Zope management screen is
> > glaringly different from the rest of the site and allows (gives one the
> > opportunity?) one to add other things besides KBEntries (or FAQEntries where
> > appropriate).
> 
> Hmmm ... couldn't do anything about the look on an aggregate basis
> (AFAIK).
> However, I believe it would be possible to create a manage_main method
> in the folder that does only what you want it to, aquiring the look of
> your site in the process somehow. YOu could also cut down on the allowed
> sub-objects in the XClass for FAQBase and KBase (although an upgrade
> would reset these to the default), since they inherit from Object
> Manager, thus limiting to only FAQ and KB Entries what can be added.
> 

I would want to retain the ability to upgrade, so I will investigate making my
own local method.  On a related note, I notice that the form that you fill in
to create a new entry (the KBEntry_addForm) uses 'raw' html and doesn't use
standard_html_header/footer.  Is there a reason for this, like the acquisition
rules not cooperating?

> >  The other problem I have is that when I'm in a FAQBase the
> > above code does not give me an edit button (in a KBase it does).
> 
> Odd, I'll see if I can duplicate it.
> 
> > I'd like to modify the KBase's and FAQBase's 'body' (was index_html) to
> > include something that a use can click on to add an new item.
> 
> The current version includes this feature for the FAQBase. I rather
> uncreatively called it 'User Support'. When adding a FAQBase, you have
> an option for User Support. Currently, when selected (or when selected
> later), it will indicate at the bottom of the FAQ Base page (index_html)
> that it alows user additions, and includes a link to the add form. The
> FAQ Maintainer will receive an email indicating that is has been
> submitted, and provide a URL to review it, as KM|News does. The
> submitter will see a page indicating this to them.
> 

I have 1.6.4 installed, I believe.  That one does not have the link.  Is that
correct?  I assume by current version you mean the one you are working on
right now? :-)

> Support for this feature in KnowledgeBase is in the works, but will be
> waiting until KnowledgeBase firms up a bit.
> 
> > In fact, I'm
> > wondering why there isn't something there already.  When you install the
> > example KBase, it seems strange that there are these sample entries but then
> > no way to add more!  Looking at the html-source for the Zope management screen
> > gives me this code:
> 
> ...
> 
> Currently, one has to be logged in to the management interface to
> manage/maintain a KBase/FAQ. One could add a user folder to the KBase,
> and provide the maintainer the ability to log in and do just that.
> 

Yeah.  I wonder if this sort of issue won't crop up repeatedly with Zope.  It
takes, I would assume, a non-trivial amount of work on the developer's part to
duplicate the needed subset of functionality that is already provided by the
standard Zope management interface.  Thus it is alot easier for a developer to
simply use the management interface.

Thanks for the help...

Cheers...
Bruce

--
Bruce Elrick, Ph.D.                       Saltus Technology Consulting Group
Personal: belrick@home.com                          IBM Certified Specialist
Business: belrick@saltus.ab.ca          ADSM, AIX Support, RS/6000 SP, HACMP