Copied to clipboard

Flag this post as spam?

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


  • Daniel Horn 319 posts 344 karma points
    Apr 12, 2011 @ 20:05
    Daniel Horn
    0

    Podio form in Umbraco?

    Anyone got an idea about why I can't get this to render?

    <script src="https://podio.com/webforms/158807/4602.js"></script>

    <script type="text/javascript">

      _podioWebForm.render("4602")

    </script>

    It's a Podio webform such as this one: www.phases.dk/umbraco

    Tried pasting it through the content editors HTML, putting it in as an macro but no luck.

    Only way it works is to put it into the template directly but I don't want it to appear on all the pages that has this template..

  • Daniel Horn 319 posts 344 karma points
    Apr 12, 2011 @ 20:24
    Daniel Horn
    0

    Warren Buckley suggested to change the output of the xslt macro to html which worked out.

    Still it could be sweet if "normal" editors could paste in podio webforms into the RTE - so if anyone got a nice work-around for that i'm very interested :-)

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 12, 2011 @ 20:47
    Kim Andersen
    0

    Hi Daniel

    Maybe you could consider creating a textbox multiple for this issue. You can put all the code you want into a textbox multiple without stripping anything. Could this be a solution?

    /Kim A

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 12, 2011 @ 20:51
    Kim Andersen
    0

    Ahh, maybe I misunderstod what you where trying to do. Well, my first solution should actually still work, but if you've got the javascript in a macro, then you must use the RenderMacroContent extension to render the content of the richtext editor. Like this:

    <xsl:variable name="content" select="$currentPage/aliasOfTheRTE"/>
    <xsl:value-of select="umbraco.library:RenderMacroContent($content, $currentPage/@id)" disable-output-escaping="yes"/>

    Does that make sense?

    /Kim A

  • Daniel Horn 319 posts 344 karma points
    Apr 12, 2011 @ 20:53
    Daniel Horn
    0

    Hey Kim

    That could be a solution - just not the prettiest one - then I would have an extra textbox at all pages.

    The "coolest" way could be if it could be pasted in the RTE - but I guess that's not really an option.

    /Daniel

  • Daniel Horn 319 posts 344 karma points
    Apr 12, 2011 @ 21:03
    Daniel Horn
    0

    Hey again

     

    The best thing would be if the little bit of script code above could be pasted in whereever the user wanted it to be in the RTE. But I guess I could make a package where you put in the little bit of code and then it will make a macro, change the output to HTML and then it's possible to insert the macro wherever you need.

     

    Something like that... 

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 12, 2011 @ 21:04
    Kim Andersen
    0

    Did you see my second reply Daniel?

    /Kim A

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 12, 2011 @ 21:09
    Kim Andersen
    0

    Oops, sorry a bit to late there :)

    Can't you just contain the javascript snippet in a xslt file, and then insert that macro in the richtext editor? Then the user can choose where in the RTE they want to insert the script...

    /Kim A

  • Daniel Horn 319 posts 344 karma points
    Apr 12, 2011 @ 21:35
    Daniel Horn
    0

    :-)

    The problem is that it's not the same javascript file - so when the user creates a new web form it's a new snippet - but I think it's only the id of the form which changes - so there might be something there that could be "automated" somehow.

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 12, 2011 @ 22:07
    Kim Andersen
    1

    You could put a macro parameter (a textbox multiple type) on the macro that's inserted in the RTE, and that parameter should be used everytime a user inserts the macro. Then they can insert the snippet that they need whenever they inserts the macro.

    In your XSLT file you can then grab the inserted snippet with somthing like this:

    <xsl:variable name="paramContent" select="/macro/aliasOfParam" />

    /Kim A

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 12, 2011 @ 22:08
    Jan Skovgaard
    1

    Hi Daniel

    If it's only the id that changes isn't it then a matter of having a textfield where this id could be stored and the fetched in the proper place for the javascript in the XSLT file (or where you construct the script).

    /Jan

  • Daniel Horn 319 posts 344 karma points
    Apr 18, 2011 @ 19:07
    Daniel Horn
    0

    I'm trying to get to a proper solution - it seems that it's fine with a textbox or just a textfield for changing the id of the form - but have to dig a bit into how the generation of the form id's are created :-).

     

    Thanks for your solutions guys and see you at CG11!

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 18, 2011 @ 20:07
    Kim Andersen
    0

    Great to hear Daniel.

    And yes, see you at CG11! :)

    /Kim A

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 18, 2011 @ 20:16
    Jan Skovgaard
    0

    Good to hear indeed.

    Let's grab a beer a CG, huh? :-)

    /Jan

  • Ansar 181 posts 291 karma points
    Apr 19, 2011 @ 08:00
    Ansar
    0

    I am not sure its a good solution.. but add your scripts in Dictionary and create a macro to GetDictionaryItem.. use the macro in RTE


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>
    <xsl:variable name="dictionaryItem" select="/macro/dictionaryItem"/>
        
    <xsl:template match="/">

      <xsl:value-of select="umbraco.library:GetDictionaryItem($dictionaryItem)" disable-output-escaping="yes" />

    </xsl:template>

    </xsl:stylesheet>

  • Christer Josefsson 55 posts 93 karma points
    Apr 20, 2011 @ 17:17
    Christer Josefsson
    0

    Podio is really interesting, really worth looking into...

  • Daniel Horn 319 posts 344 karma points
    Apr 20, 2011 @ 17:39
    Daniel Horn
    0

    I'll try your solution as well Anz.

     

    Christer: 

    Yeah - sure is, if anyone want's to see some podio stuff @ CG11 just ping me :-)

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 24, 2011 @ 09:47
    Kim Andersen
    0

    Hi Anz

    Could you say a couple of words on why you don't think the previous ideas are good solutions? Could be quite interesting to hear about :)

    - Thanks

    @Daniel:

    If you have some spare time at Codegarden I think a small demo of your Umbraco/Podio stuff would be great. Just a small demo of 15 minutes or so in the sun over a beer :)

    /Kim A

  • Ansar 181 posts 291 karma points
    Apr 26, 2011 @ 11:37
    Ansar
    0

    Hi Kim,

    What I try to say is.. am not sure whether MY solution with dictionary variable is good for the current scenario :)

    Anz

  • Kim Andersen 1447 posts 2197 karma points MVP
    Apr 26, 2011 @ 13:08
    Kim Andersen
    0

    Ahh, makes sense then :)

    Even though I'd love to hear if anyone finds the previous solutions bad solutions. Always want to learn new stuff :)

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft