Tip-A-Friend link generated using Typoscript

Submitting your vote...
Rating: 3.5 of 5. 4 vote(s).
Click the rating bar to rate this item.

This snippet generates a link to the page where you have the "Tip-a-Friend" extension installed.

ID of "Tip-a-Friend" page (in FORM mode), is defined in the CONSTANT plugin.tipafriend.PIDtipForm"

 

You can then use it to insert links to the Tip-a-Friend page, without using the Tip-a-Friend plugin in LINK mode. (Which only supports inserting the link as a standard text link, but with this snippet you can it for image links etc.)

 

Example:

 

10 = IMAGE
10.file = fileadmin/taf.gif
10.stdWrap.typolink.parameter.cObject < lib.tipurl

 

 

lib.tipurl = COA
lib.tipurl {
   
  # This snippet generates a link to the page where you have
  # the "Tip-a-Friend" extension installed (in FORM mode).
  # ID of "Tip-a-Friend" page, is defined in the CONSTANT
  # "plugin.tipafriend.PIDtipForm"
  10 = TEXT
  10.typolink.parameter = {$plugin.tipafriend.PIDtipForm}
  10.typolink.returnLast = url
  10.typolink.additionalParams.cObject = COA
  10.typolink.additionalParams.cObject {
     
    # This part generates the "tipUrl" parameter in the
    # correct format. (rawUrlEncoded)
    10 = COA
    10 {
       
      # This part adds the domain (baseUrl) to the link URL
      10 = TEXT
      10.data = TSFE:baseUrl
       
      # This part creates an URL pointing to the current page
      # including all parameters from the query string.
      20 = TEXT
      20.typolink.parameter.data = page:uid
      20.typolink.addQueryString = 1
      20.typolink.addQueryString.exclude = id
      20.typolink.returnLast = url
       
      # Then everything is rawUrlEncoded so it can
      # be placed as a single parameter in the link URL
      stdWrap.rawUrlEncode = 1
    }
    # And finally the parameter data is wrapped with the "&tipUrl=" parameter.
    wrap = &tipUrl=|
  }
}

 

 

This snippet was submitted by Peter Klein.



Comments


Eric, 18-10-07 21:58:
There is a way to send the complete page as an html mail, instead a link to it?

Regards,

Add comment

* - required field

*



*
*

Top 10 Updates

Making the Section Menu work correctly with TemplaVoila geändert am  05-May-2009 10:27:17
Show pages with type "Not in Menu" in a sitemap geändert am  05-May-2009 10:11:17
Implementation of the DHTML menu from brainjar.com  geändert am  01-Feb-2009 13:02:48
Sample DHTML menu geändert am  01-Feb-2009 12:51:25
A introduction to the CONTENT object geändert am  26-Jan-2009 12:20:39
Sample for dynamic image masks geändert am  16-Dec-2008 15:42:32
Useful Links geändert am  11-Dec-2008 10:06:17
Using Transparent PNG's in IE5/6 without JavaScript geändert am  04-Oct-2008 12:27:15
Using lightbox without extension geändert am  13-Jun-2008 14:20:51
Custom field for GMENU alt text geändert am  13-Jun-2008 13:58:07

Latest comments

02-Jul-2009 10:58:10
Sergii schrieb: not working
tt_news frontend editing
30-Jun-2009 12:25:44
JG schrieb: Doesn't work for me also.
Show "Not in Menu" in a Sitemap
19-Jun-2009 12:57:23
Elena schrieb: Nice code, but you will get two header on the page, if the type of page is "text/with image", not...
Different formating for the first Element in TYPO3
Deutsch
Search: