Filter options

Category

Search

Reset

Add snippet

If you would like to create a new snippet, please click here:

Add snippet

Print link with all URL Parameters

Author Tags Category Date
Bernhard Gschwantner

1 snippets

TEXT, printlink, typolink, typoscript, Realurl, tt_news typoscript February 23, 2009

This Typoscript snippet creates a print link with all GET Parameters, not just the Page ID. So this should also work with tt_news single view and other extensions.

Of course you also have to define a page template with the page type 98.

  1. temp.print-link = TEXT
  2. temp.print-link {
  3. value = Print this page
  4. wrap = <p class="print-link">|</p>
  5. typolink {
  6. # link to the current page id with type 98
  7. parameter = {page:uid},98
  8. parameter.insertData = 1
  9. useCacheHash = 1
  10. # add all get parameters from the current URL
  11. addQueryString = 1
  12. addQueryString.method = GET
  13. # remove the page id from the parameters so it is not inserted twice
  14. addQueryString.exclude = id
  15. }
  16. }
  17.  
  18. # Add the print link to your page (you will have to adapt this to your setup)
  19. page.10.subparts.PRINT-LINK < temp.print-link