View member feedback to this tip.
When you use the resource "embedded View" in a Form with the option "show single category" you will find problems to show the following and previous pages with this same single category.
Code
To solve this problem: You just have to create one form with a editable field "Query_String_Decoded" like the following.
@Right(Query_String_Decoded;"&xyz =")
In tab field properts HTML/field "Others",
set as = type=hidden
In "embedded View" choose a View you want to show
In "show single category" = Query_String_Decoded
In "HTML Body attibutes" = "onclick='myclick() '"
In "JS Header" adds the function:
function myclick() {
source=event.srcElement.parentElement;
tag = source.tagName;
if (tag == 'A') {
if (source.href.indexOf('&Start')> 0){
source.href = source.href+'&xyz='+
document.forms[0].Query_String_Decoded.value
}
}
}
Always call the form with "?openform&xyz=myfirtcategory "
MEMBER FEEDBACK TO THIS TIP
Wouldn't it be easier to specify the single category by opening the form with the relevant "&RestrictToCategory" added to the open form URL? I haven't been able to prove it, but I'm sure if you do it this way that you wouldn't have a problem with next and previous in the first place.
-- Stephen N.
Do you have comments of your own? Let us know.