What i want is an easy and smart way to be able to send parameter to the flash through URL parameters.
Lets say i pick a swf file from the media section to show, but i want to send "showNiceUmbracoLogo=true" to the flash. I could make a new macro parameter to take the url parameters. Thats some of the way. Now i want it to be smarter. What if the document/page i have inserted the macro on has a property to define the boolean value. So on one page i want to send "true" and another has "false".
So i need something like a string.replace smart way to get the values from the page or even smarter to also have et recurcive. (The "Insert flash" macro is made of 1 single xslt file). So maybe the macro paramter could look like this:
yes but thats to hardcoded. What if another that has downloaded the project need a parameter called "niceLogo" one place, but another place need "notNiceLogo". Then the macro needs two parameters, no good :)
And the macro can be inserted in the rich text editor so it also have to work there and not only in a template.
That could be a solution. But then a more tricky part is to have some kind of string replace to find properties from $currentpage or a parent ( for recursive use ). So in the template where you use it you could send a color value to the flash from the document its place in. And then the user could select the color by editing the document in umbraco.
Looking for a little help on my insert flash project
Hi all,
I have some time ago released the "Insert flash" project on our, http://our.umbraco.org/projects/insert-flash, but i need a little help/guidelines to extend it even more.
What i want is an easy and smart way to be able to send parameter to the flash through URL parameters.
Lets say i pick a swf file from the media section to show, but i want to send "showNiceUmbracoLogo=true" to the flash. I could make a new macro parameter to take the url parameters. Thats some of the way. Now i want it to be smarter. What if the document/page i have inserted the macro on has a property to define the boolean value. So on one page i want to send "true" and another has "false".
So i need something like a string.replace smart way to get the values from the page or even smarter to also have et recurcive. (The "Insert flash" macro is made of 1 single xslt file). So maybe the macro paramter could look like this:
showNiceUmbracoLogo=[$documentBooleanValueProperty]&testing=[$anotherDocumentValue]&test2=normalValue
Any ideas?
You can pass the querystring parameters to macro parameters. So create a parameter on your macro (for example:niceUmbracoLogo).
In the template you can then add the the querystring parameter: niceUmbracoLogo="[@showNiceUmbracoLogo]"
Then in your XSLT file you can select for: //macro/niceUmbracoLogo
Hope this helps!
yes but thats to hardcoded. What if another that has downloaded the project need a parameter called "niceLogo" one place, but another place need "notNiceLogo". Then the macro needs two parameters, no good :)
And the macro can be inserted in the rich text editor so it also have to work there and not only in a template.
what about a tag dataType or something siimlar? send the parms in param, value pairs?
That could be a solution. But then a more tricky part is to have some kind of string replace to find properties from $currentpage or a parent ( for recursive use ). So in the template where you use it you could send a color value to the flash from the document its place in. And then the user could select the color by editing the document in umbraco.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.