How to make the TypoScript pageID in Typo3 available for JavaScript

Sometimes it is necessary to have the current pageID from Typo3 available within you website for JavaScript actions and so on.
You are able to do this with a little wrap like this:

page.bodyTagCObject = HTML
page.bodyTagCObject.value.field = uid
#page.bodyTagCObject.value.wrap = <body id="pageID_|">
#page.bodyTagCObject.value.wrap = <body onload="sendPageIdToAnyFunction(|)">
page.bodyTagCObject.value.wrap = <body onload="alert(|)">
  1. Hey Wo ist denn der like Button? 😉

      • tdeuling
      • November 10th, 2011

      Welcher von den vielen!? 😉

  1. No trackbacks yet.