-----Ursprungligt meddelande-----
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Magnus Eklund
Skickat: den 23 september 2008 18:46
Till: Sesat Kernel usage and development discussions.
Ämne: Re: offset link missing some parameters

 

2008/9/23 Anna Larsson <[EMAIL PROTECTED]>:

>> On this page: http://sesam.se/nyheter/person/Anders+Borg when clicking on

>> the "nästa" link at the bottom, the link is missing the type=person in the

>> url.

>> 

>> 

>> 

>> $datamodel.navigation.getNavigation('offset').results.get( 0 ).url   is the

>> code that gets the url for the offset link.

>> 

>> 

>> 

>> in views.xml (don't have any reset function in offset)

>> 

>>                 <navigation>

>> 

>>                     <nav id="offset" command-name="newsSearch">

>> 

>>                         <options>

>> 

>>                             <config>

>> 

>>                                 <add display-name="nästa"

>> value-ref="nextOffset"/>

>> 

>>                             </config>

>> 

>>                         </options>

>> 

>>                     </nav>

>> 

>>                 </navigation>

>> 

>> 

 

>I think what you really want might not be the extra "type" parameter

>but rather the URL structure to be kept with just an extra "offset"

>parameter. In this way the value of the type parameter is retained as

>a path segment:

> 

>http://sesam.se/nyheter/person/Anders+Borg?offset=20

> 

>This can be achieved with the NewsCaseUrlGenerator. What does your

><navigation tab="nc"....> tag look like? Does it define the

>url-generator and prefix attributes?

 

<navigation tab="nc" out="true" command-name="newsSearchCasePersonNavigator">

    <fast id="people" field="newsCase">

        <static-parameter name="type" value="person"/>

    </fast>

    <fast id="cases" field="newsCase">

         <static-parameter name="type" value="sak"/>

    </fast>

</navigation>

 

Is something wrong or missing?

 

 

>However, the type parameter should have been included regardless of

>the url generator in use. What does your person navigator definition

>look like?

 

>> 

>> 

>> 

>> 

>> 

>> We have the same problem in test environment, where we have added two extra

>> url parameters (to be able to display news within a date interval) that

>> doesn't get included in the url when clicking to get to the next page.

>> 

>> http://nuclei.test.sesam.se/search/?c=nc&newsCase=Ryder+Cup&type=sak&fromDate=2007-09-04&toDate=2008-09-24

>> 

>> when clicking you get this url:

>> 

>> http://nuclei.test.sesam.se/search/?c=nc&newsCase=Ryder+Cup&offset=37

>> 

>> (missing parameters: type, fromDate, toDate)

>> 

 

>These parameters need to be defined in the navigation configuration

 

><navigation>

> <nav id="fromDate"/>

> <nav id="toDate"/>

>...

>...

>...

></navigation>

 

Thanks, will do that! =)

 

>> 

>> 

>> 

>> What makes some parameters get included in url and some not?

>> 

 

>The navigation code only knows and cares about parameters found in the

>navigation configuration. The simplest case being the configuration

>shown above where you only want to keep whatever value the parameter

>have.

 

>> Have we missed to include something in views or modes files?

>> 

>> 

 

- Magnus

_______________________________________________

Kernel-development mailing list

[email protected]

http://sesat.no/mailman/listinfo/kernel-development

_______________________________________________
Kernel-development mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-development

Reply via email to