Developer forum

Forum » CMS - Standard features » Pages URL in Item Publisher

Pages URL in Item Publisher

Nuno Aguiar
Reply

Hi,

 

We have a chalenge using Item Publisher, pages and query string parameters. I understand that the pages loop only considers the filters set in the paragraph's IP module settings.

 

Is there any way for the module to consider query string parameters and having pages URL's updated? I understand we may need to consider that we don't want that sometimes, but most of the times we may, and having to build the paging by hand is not an option.

 

Creating a checkbox in the pages fieldset saying "Consider query strings" would be enough or is there any other way?

 

Best Regards,

Nuno Aguiar


Replies

 
Nuno Aguiar
Reply

Hi,

 

Any thoughts?

 
Nicolai Høeg Pedersen
Reply

Hi Nuno

I do not understand your question... could you please give an example?

Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Her's an example: http://rowlf.dw-demo.com/choral/browse-by-composer?Name=*A*
 

By placing TemplateTags in the pages loop, the URL tags do not account for the Name query parameter, so we had to change it for every loop interaction:

pagingHref = GetGlobalValue("Global:Request.Url").Contains("page") ? GetGlobalValue("Global:Request.Url").Replace("page="+curPage, "page=" + thisPage) : GetGlobalValue("Global:Request.Url") + "&page=" + thisPage;

 

curPage and thisPage are simple variables, but basically we are getting the current Request URL and adding the desired page num

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Still do not understand your question...

 
Nuno Aguiar
Reply

Hi Nicolai,

 

We temporarily disabled the fix and I got you a better example:

  1. Go to http://rowlf.dw-demo.com/choral/browse-by-composer?Name=*B*
  2. The URL is alredy getting results filtered where Name contains B
  3. Notice you got 3 pages
  4. If you go to page 2 or 3, you loose the Name filter, thus getting 11 pages (unfiltred results)

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Ah, in your template you have FQDN in the links. Then they are not parsed.

Capture.PNG
 
Nuno Aguiar
Reply

Hi NIcolai,

 

The bottom 2 you highlighted is something we built manually (outside the loop) - I will have someone fix that, but that's not the problem.

The 1st URL you highlighted if comming directly from the loop, and it's not considering the Name=*B*. I would expected the tag to render "/choral/browse-by-composer?PID=615&Name=*B*&page=3"

 

Makes sense?

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Yes - but that is because of the missing PID and you probably have that checkbox set that requires that PID matches the ParagraphID.

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Even when I force the PID it does not work. Check it out http://www.screencast.com/t/mUaIJJr8

 

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Not sure I understand what the problem is...

Is it the missing filters in the paging links or the missing rewrite to friendly URLs?

Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

If I go to another page I lose the filter "Name=*A*" - So basically we need to override the standard pageURL tags

 

This is what I get for page 1 and 2 (see video at 0:55) 

  1. /Default.aspx?ID=127&PID=625&page=1
  2. /Default.aspx?ID=127&PID=625&page=2

 

Since I am filtering I expected to have:

  1. /Default.aspx?ID=127&PID=625&Name=*A*&page=1
  2. /Default.aspx?ID=127&PID=625&Name=*A*&page=2

 

Hope it's clear now :)

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Well - only way is to handle that your self inside the pages loop.

 
Nuno Aguiar
Reply

Hi Nicolai,

 

That's what we did with a few Replace methods in Razor, but seems like something the module is supposed to pick up on. If the list is filtered and a set of pages as well, the page's URL should be.

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum