[Zope-PTK] Member properties
Mike Standley
standley@asset.com
Tue, 01 Aug 2000 09:31:35 -0400
Thank you for your response.
I have now managed to get the Wizards working correctly. It seems I had
the wrong url to the add method (as I said I am very new to Zope). I am
now able to add new products and wizards to create them.
-- I am still struggling with adding personal properties for the users
(Question 1 below). It seems like I should just add properties to the
LoginMember ZClass of the DemoPortal and then start assigning values to
them. I can programmatically get all the properties that were
predefined but not the ones I added.
-- I was curios about another thing as well. The Advanced ZCatalog
How-To says to use <dtml-in "Catalog(meta_type=['DTML
Method','ZCatalog'])"> to perform a search for Method or ZCatalog.
However when I tried to use this technique I would not get the expected
results. For example:
getSearchResults(meta_type='myType1') -- returns 5 results
getSearchResults(meta_type='myType2') -- returns 3 results
getSearchResults(meta_type=['myType1, 'myType2']) -- returns 0
results
I started digging into the code and followed it down to
SearchIndex.UnTextIndex._apply_index and found that it calls
intersection on the bucket and even has a note that says that it does an
'and' on the results. Am I missing something, or is the How-To
incorrect?
BTW. This is the first time I have ever tried posting questions to a
mailing list so if there is a better place for me to ask these questions
please let me know.
Thanks again for any help.
Mike Standley
Tres Seaver wrote:
>
> Mike Standley wrote:
> >
> > I am new to both Zope and the PTK (I do have some Python experience) so
> > please forgive me if my questions are too obvious. I have looked in the
> > mailing list and searched the Zope site to find information but have
> > been unsuccessful. I am on a very tight schedule to get this done and
> > am running out of time to figure it out by diving into the source.
> >
> > Question 1:
> >
> > I would like to change the demo portal to provide new properties for
> > each member such as the Chrome, listed, and Email properties. I found
> > these properties on the DemoPortal/LoginMember product. I added new
> > propeties (i.e. myNewSystemProperty/myNewCommonProperty) to both the
> > SystemProperties and the CommonProperties property sheets. I then tried
> > to access them in the same manner as was done on the personalize_form
> > page (i.e. <dtml-var "AUTHENTICATED_USER.myNewSystemProperty"
> > html_quote>">. I get an AttributeError. Also the in statement that
> > prints all properties from the CommonProperties sheet does no show the
> > property that I added.
> >
> > I have tried creating a new portal after I made the changes so that they
> > would take affect but with the same result. I tried exporting the
> > DemoPortal with my changes and then reimporting and creating yet another
> > portal but still no success.
> >
> > Question 2:
> >
> > Problem adding instances of ZClass through portal interface:
> >
> > As a specific example, created under Products a folder named
> > ContactProduct, and inside a ZClass called ContactClass with base class
> > Portal Content Base. Added a property sheet and properties, a View,
> > edited ContactClass_add to reference the property sheet and
> > ContactClass_addForm to include properties.
> >
> > Am able to add instances of this class from the ptk/manage screen via
> > the Add Available Objects menu, but can't seem to reference
> > ContactClass_add or ContactClass_addForm from the portal itself. Problem
> > is perhaps in the way I'm referencing them; trying to use a Wizard
> > points to localhost:8080/ptk/Members/UserName/ContactClass_add or a
> > similar location. Even with direct linking, I'm not able to point to the
> > ContactClass_addForm. Any help greatly appreciated.
> >
> > Any help would be greatly appreciated. Thanks in advance for any help.
>
> You need to create a Wizard instance for your new ZClass and install it
> into the "Wizards" folder of your portal. See my quick notes on ZClass
> PortalContent:
>
> http://www.zope.org/Products/PTK/ZWiki/CreatingAPortalContentZClass
>
> Tres.
> --
> =========================================================
> Tres Seaver tseaver@digicool.com
> Digital Creations "Zope Dealers" http://www.zope.org