Forum OpenACS Q&A: Re: Can I pass arbitrary variables to xowiki pages in the url?

Gustaf,

Thank you for the reply. I am a little confused though about this.

I have an ::xowiki::Form that has various fields for content to enable the creation of new FormPages that are automatically styled. One of the fields is an includelet specification field in which I am in this example putting the carousel includelet.

Instead of creating an instance of the FormPage with the folder that contains the images hard-coded into the includelet specification for every set of pictures, I would like to be able to provide the folder_id for the images to display from a value passed in the url.

Am I correct in understanding that I should create the minimal forms you describe above (which when allocated a category will naturally appear in the dropdown menu), and then include these forms in the page?

So essentially we would have a carousel embedded within a form, which itself is embedded in a form?

Regards
Richard

Ah! It's ok. I see. I had effectively already done this, and was getting confused by trying to re-use a single formpage. However, I was collecting the entire includelet spec in a formfield. I can't then reasonably expect to be able to substitute another @value@ into the result of an already substituted @formfield@! This would require nested substitutions within a single ::xowiki::Form!! 😱

If I put the fixed part of the includelet declaration into the ::xowiki::Form spec, then I see that I could add a hidden field to the form and pass in values using a query parameter in the url. The disadvantage with this is that then I would lose the ability to add SEO content to the resulting carousel page, which has other fields specifically for this purpose, and any case, to drive a menu you would have to have an instance of one form or the other for each folder of pictures.

I apologise that this may be a bit confusing to read, but I have posted it as a record for future reference.

R.