Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 07, 2010 @ 17:31
    Anders Burla Johansen
    0

    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?

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Jan 07, 2010 @ 17:40
    Sebastiaan Janssen
    0

    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!

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 07, 2010 @ 17:48
    Anders Burla Johansen
    0

    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.

  • bob baty-barr 1180 posts 1294 karma points MVP
    Jan 08, 2010 @ 04:50
    bob baty-barr
    0

    what about a tag dataType or something siimlar? send the parms in param, value pairs?

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 08, 2010 @ 08:06
    Anders Burla Johansen
    0

    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.

  • 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.

Please Sign in or register to post replies