Ciao,
thanks for any consideration.
On 03/01/13 10:54 AM, dtrussardi(a)tiscali.it wrote:
>> The first time ( and when open a new session ) the anchor relative to the menu
report right href with the _s and _k parameter
>> for example the Home anchor report :
>>
>> <a class=" active internal page" title="Welcome to
Pier!"
href="/pier?_s=9K76T_OM34OI-n_d&_k=mZPHc-oUOnpyR1IQ&_n&1">Home</a>
>>
>> For each next sequence display the menu anchor don't report any _s _k
value.
>>
>> Someone has some suggestions indication on how to solve the problem?
This behaviour has always disturbed me, and thanks to your question, I've finally
looked into it.
It seems that the menu is nothing more than a page with a list of structure links, and is
displayed through a PRDefaultView. If you look at PRDefaultView>>isRestful, it
returns true. Try an *experiment*, and change it to return false. Does the change cause
the generated anchor links to have the "lost" _s and _k parameters?
I change the PRDefaultView>>isRestful to ^false and with it the menu anchor
manage the _k parameter.
With the _k parameters the request work fine and don't create a new instance of the
page at any click.
I don't understund because the menu anchor don't manage the _s parameter but the
_k is enough for my question.
The problem is that if your menu item points at a structure that is not restful (and your
counter state is not restful), then the menu item will appear to misbehave. I think the
fix is to create your own menu widget. Maybe look at PRViewsWidget or PRCommandsWidget to
see what code is needed.
In my image i have a deprecated PRMenuWidget it can use for solve this problematic ?
I look at PRViewsWidget and i think to define a new PRNewMenuWidget
and define a menuPage with
menuPage
^ menuWidget ifNil:
[ menuWidget := (PRPage named: 'menu')
addChild: ((PRComponent named: 'widgetmenu')
prototypeInstance: PRNewMenuWidget new;
yourself);
contents: '+widgetmenu+'
]
Now i don't understand where i define the menu structure:
'- *Home>/*
- *Chi siamo>/chisiamo*
- *Missione>/missione*
- *Catalogo>/catalogo*
- *Offerte>/offerte*
- *Ordini>/menuonline*
- *Blog>/blog*
- *Riferimenti>/riferimenti*';
and how redefine the method PRNewMenuWidget renderItem: aClass on: html
Thanks,
Dario
P.S. i'm interested to understund the pier environment. Where i can found some
documentation?