Hi All
I want to have an email this page link in the footer of my website
When the end user clicks on this link a custom form would load. The end user just needs to enter the email address of their friend and then press submit. They shouldn't need to enter the website address of the page they were on when they clicked the link. Is there a way to do this?
thanks
Tim
I think living greener do this nicely, although there are a few different ways to achieve this:
http://www.livinggreener.gov.au (click email this to a friend).
This is achieved by loading a custom form, displaying it via lightbox overlay and submitting it using javascript http request (ajax). Nesting the form allows the custom form to have access to the current asset url keyword to send via hidden input in the form (and also any other information about the current asset, like id etc). Using ajax to post avoids any potential proxy or browser caching issues.
You could also potentially use the SERVER HTTP_REFERRER keyword (see the server variable section on this page: http://manuals.matrix.squizsuite.net/concepts/chapters/global-keyword-replacements/). Sometimes, however, this variable may not have a value so relying on it could cause a few issues
Hi Anthony
awesome thanks for that
I checked out living greener and website and that works nicely
Although I wouldn't need the lightbox overlay
What's the 'url keyword'
thanks
Tim
[quote]
I think living greener do this nicely, although there are a few different ways to achieve this:
http://www.livinggreener.gov.au (click email this to a friend).
This is achieved by loading a custom form, displaying it via lightbox overlay and submitting it using javascript http request (ajax). Nesting the form allows the custom form to have access to the current asset url keyword to send via hidden input in the form (and also any other information about the current asset, like id etc). Using ajax to post avoids any potential proxy or browser caching issues.
You could also potentially use the SERVER HTTP_REFERRER keyword (see the server variable section on this page: http://manuals.matrix.squizsuite.net/concepts/chapters/global-keyword-replacements/). Sometimes, however, this variable may not have a value so relying on it could cause a few issues
[/quote]
Actually after reading your response I realised that this code works quote well:
<a href="mailto:?subject=webpage you might find useful&body=Hi, I was on %globals_asset_metadata_site_name% website and I found this webpage that you might find useful: %asset_url%">
[quote]
Hi Anthony
awesome thanks for that
I checked out living greener and website and that works nicely
Although I wouldn't need the lightbox overlay
What's the 'url keyword'
thanks
Tim
[/quote]
[quote]
Actually after reading your response I realised that this code works quote well:
<a href="mailto:?subject=webpage you might find useful&body=Hi, I was on %globals_asset_metadata_site_name% website and I found this webpage that you might find useful: %asset_url%">
[/quote]
What if someone browses the site from the computer in an internet café?
Us a paint layout with a nested custom from. Then you can use the normal asset keywords in the form for that page. Here is how we do it:
http://www.puc.edu/news/archives/2011/tammy-mcguire-named-educator-of-the-year
http://www.puc.edu/news/archives/2011/tammy-mcguire-named-educator-of-the-year?SQ_PAINT_LAYOUT_NAME=email
Those are the same page, but one is told to use a paint layout with a nested form.