1

I am using this URL to access the raw HTML of a component:

/index.php?option=com_downloadform&tmpl=component

However it also returns the document type, title tags, head tags etc.

Is there a way to return only the content between <body> and </body>?

Thanks,

Ian

jackJoe
  • 11,078
  • 8
  • 49
  • 64
Ian Jamieson
  • 4,376
  • 2
  • 35
  • 55

1 Answers1

5

Inside your template folder, create a file (e.g. raw.php) and inside that file place only:

<jdoc:include type="component" />

Then, you can use /index.php?option=com_downloadform&tmpl=raw to access the raw output of the component. The tmpl parameter in your link must be the name of the file without the extension.

tliokos
  • 3,606
  • 3
  • 28
  • 28