Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    May 06, 2010 @ 02:24
    Tom
    0

    Email to a friend

    Hi i was trying to think up a plan of attack for an email to a friend piece of functionality that would appear in an overlay.

    I was just wondering how I could make this happen in contour..

     

    I was thinking have a node called EmailAFriend.aspx as a url on each page with a rel=overlay to bring it up in an overlay.

    My problem is ill need some way of passing the current page url into a contour email somehow..

    i was looking at per's xslt html email thing but am not sure how to proceed.

     

    Thanks,

    Tom

  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 06, 2010 @ 02:55
    Nik Wahlberg
    0

    Hi Tom, how about using something like facebox to load your form and pass the 'current' page in the URL (then parse it in your control). You'd probably need to extend Contour to create a field that will read the URL var OR, you could use a standard text box and include in your display file some JS to populate by reading the query string. 

    HTH,
    Nik

  • Tom 713 posts 954 karma points
    May 06, 2010 @ 03:35
    Tom
    0

    Hi Nik,

    thanks so much for you reply..

    We're using jQuery tools overlay it was mainly just the passing of the value into contour so i was thinking something like

    http://domain.com/email-a-friend.aspx?page-id=1111

     

    and then how to get page-id into the email via nice url..

    would the bracket syntax work? like how can you retrieve query string values via the bracket syntax?

  • Nik Wahlberg 639 posts 1237 karma points MVP
    May 06, 2010 @ 04:33
    Nik Wahlberg
    0

    Hmmm, here's a thought (maybe), how about you have a template that houses your contour form AND an XSLT macro that basically just does the following:

    <xsl:variable name="pageId" select="umbraco.library:RequestQueryString('pageId')"/>
    <xsl:variable name="pageUrl" select="umbraco.library:NiceUrl($pageId)"/>
    
    <script type="text/javascript">
        $(document).ready(function(){
        //set the value of the textbox and include the page URL that we set above...
        $('#idOfTextField').val('Hey! Check out this page:\n\n<xsl:value-of select="$pageUrl"/>');
        });
    </script>

    Not tested this, but something like that should work (outside of creating a custom field using the contour API. 

    HTH,
    Nik

  • Harald Ulriksen 207 posts 249 karma points
    May 06, 2010 @ 08:20
    Harald Ulriksen
    0

    Tom, I suggest you use an alternate template for the contour form, instead of calling contour from a content page. That way you get the page ID of the original page in the record. Plain and simple.

    However if you go with a separate contour node you can get the page id stored in it by using a custom workflow and update the record page id. You can send the page id in the query string, which you can access through the RecordEventsArg parameter

    record.UmbracoPageId = int.Parse(e.Context.Request.QueryString[pageId])

    However I would definitely go for the alternate template approach as it requires no extra programming and it will save you a lot of EMailAFriend nodes.

  • Tom 713 posts 954 karma points
    May 07, 2010 @ 07:34
    Tom
    0

    how do i delete that previous post? is there a way i can? or can an admin please delete the xslt markup

  • Tom 713 posts 954 karma points
    May 10, 2010 @ 02:26
    Tom
    0

    Can someone please delete the 5/7/2010 7:33:36 AM post

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 11, 2010 @ 06:52
    Dirk De Grave
    0

    Tom,

    Post has been deleted as per your request.

     

    Cheers,

    /Dirk

     

Please Sign in or register to post replies

Write your reply to:

Draft