[Product-Developers] Re: constructing portlethash?
Christian Klinger
cklinger at novareto.de
Fri Feb 8 08:12:14 UTC 2008
Martin Aspeli schrieb:
> Christian Klinger wrote:
>> Hi Plone-Developers,
>>
>> i have a simple question, how can i construct a portlethash
>> in my kss-view?
>>
>> Where do i get the values for my info dict??
>>
>> I found nothing on google.
>>
>> Maybe someone of you has an idea....
>>
>>
>> thanks in advance
>> christian
>>
>> info = dict(
>> manager = 'plone.leftcolumn',
>> category = 'context',
>> key = '/new1',
>> name = 'login',
>> )
>>
>>
>>
>> class KSSDocZeichen(PloneKSSView):
>> """ KSSDocZeichen """
>>
>> @kssaction
>> def addDocZeichen(self, form={}, portlethash=None):
>>
>> Portlethash = hashPortletInfo(info)
>> self.getCommandSet('plone').refreshPortlet(Portlethash)
>> mac = self.macroField(field='doczeichen')
>> core = self.getCommandSet('core')
>> ....
>
> This doesn't work?
>
> In general, people tend not to construct them at all. Instead, you pass
> the portlethash from the template as a "kssattr" variable and just use
> it directly.
>
> Martin
>
Hi Martin,
sorry for being unclear, i don´t know where i get the values for the
info dict. The info dict is only a example. Where i get the values
for it?
I will try to use the kssattr. Is it possible to use the "kssattr
for my portlethash" in an edit_form of my object? base_edit or something
like that.
Christian
More information about the Product-Developers
mailing list