Hi folks
This could be quite simple…
I have a bunch of wonderful Single Calendar Events with associated metadata.
I'm displaying them using a paint layout. I'm using a conditional keyword to nest in a booking form for the event based on one of the event's metadata values.
I'm passing a number of hidden values in the form to pass some of the event details (e.g. start time, date etc) along with some of the metadata values using %globals% keywords.
That all works a treat.
Here's where it gets slightly more complex:
The single calendar events have a parent which is always a folder and always one level back up the tree.
I'm currently able to display the name of this folder at the top of the page by nesting in an asset listing that looks back up the tree one level for a folder using the asset_id keyword in the dynamic parameters of the asset listing.
What I can't currently do is do the same thing to fill the value of a hidden field that I'm passing to the form submission.
I've tried using %globals_asset_assetid% and a combo of sessionids including list_current_asset_id but to no avail - I always get the no results bodycopy.
I'm sure it can be done… just not sure what keyword or format I should use.
So the question… do I need to set a variable where I'm nesting the asset listing and if so, what needs to go in the fields there… AND
what do I need to put in as the dynamic parameter, what sort (GET etc) and what keyword to use for the value.
Make sense?
Cheers
D.
Couldn't you just use some javascript to copy the name of the page into a hidden field? Sounds easier than having to do a complex nested asset configuration.
[quote]
Couldn't you just use some javascript to copy the name of the page into a hidden field? Sounds easier than having to do a complex nested asset configuration.
[/quote]
Yep, that's my fallback… hoped I could do it completely in Matrix just in case users don't have javascript enabled.
Consulted with the wonderful peeps in Squiz UK support and after a bit of faffing they worked it out:
The solution here seems to be to use %asset_contents_raw% instead of %asset_contents% to pull in the form from the paint layout.
This along with passing a get variable (in this case called "eventid" using the keyword %globals_asset_assetid%) where the asset listing was nested and then setting the dynamic parameters to GET with the keyword "eventid" on the asset listing details screen did the trick.