[Zope] KnowledgeKit HowTo?
Bruce Elrick
belrick@home.com
Sat, 30 Oct 1999 23:44:46 -0600
(this is a re-send of an earlier message I sent to Bill and zope.@zope.org.
Strangely enough, zope.org's mailserver did not like the extra '.' ;-) )
I'm wading into using the KnowledgeKit product and have some questions. First
of all, though, thank you to Bill for creating it. Second, let me state that
I briefly went through the Zclass tutorial but don't understand all the pieces
(factories, etc.).
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).
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). 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).
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. 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:
<FORM ACTION="http://fred/Zope/SKB/" METHOD="GET">
<SELECT NAME=":method"
ONCHANGE="location.href=this.options[this.selectedIndex].value">
<OPTION value="manage_workspace" DISABLED>Available Objects
<OPTION value="manage_addCookieCutterForm">CookieCutter
<OPTION value="manage_addProduct/OFSP/documentAdd">DTML Document
<OPTION value="manage_addProduct/OFSP/methodAdd">DTML Method
<OPTION value="manage_addProduct/KnowledgeKit/FAQBase_factory">FAQ Base
<OPTION value="manage_addProduct/KnowledgeKit/KBase_factory">Knowledge
Base
<OPTION value="manage_addProduct/KnowledgeKit/KBEntry_factory">Knowledge
Base Entry
<OPTION value="manage_startWizard">P SQL Input Wizard
<OPTION value="manage_addTinyTableForm">TinyTable
<OPTION value="manage_addProduct/ZSQLMethods/searchAdd">Z Search
Interface
</SELECT>
<NOSCRIPT><INPUT TYPE="SUBMIT" VALUE=" Add "></NOSCRIPT>
</FORM>
from which I could cut:
<FORM ACTION="<dtml-var URL0>" METHOD="GET">
<SELECT NAME=":method"
ONCHANGE="location.href=this.options[this.selectedIndex].value">
<OPTION value="manage_addProduct/KnowledgeKit/KBEntry_factory">Knowledge
Base Entry
<NOSCRIPT><INPUT TYPE="SUBMIT" VALUE=" Add "></NOSCRIPT>
</FORM>
And paste it into the KBase's "body" DTMLmethod (was index_html) and similarly
for FAQBase.
Does this seem reasonable? Is there better HTML than the above to accomplish
this? Am I completely missing the boat on how one would use this product? :-)
Thanks in advance for any help...
Cheers...
Bruce
P.S. Thanks, Bill, for making this an exported product so that we can look at
it and learn....
--
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