Forums / Setup & design / How to include external html

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

How to include external html

Author Message

Andreas Zwinkau

Saturday 13 August 2005 6:26:49 am

I want to include a html snippet from an external url into one page (article). Probably similar things will come up later, so i think a CustomTag insert is the best way to do this.

The template language does not support fetching from url, does it? How should this be done?

The external url is: http://www.evangelische-termine.de/Veranstalter/teaser.php?vid=1099&count=10&t_high=all&t_kat=all

Gabriel R.

Saturday 13 August 2005 7:42:34 am

Use the php function 'file_get_contents' defined as a new ezp template operator to fetch external content.
See http://ez.no/products/ez_publish_cms/documentation/development/kernel/custom_template_operators
for detailed information

Override the template.ini file:

[PHP]
PHPOperatorList[file_get_contents]=file_get_contents

Example:

{'http://www.evangelische-termine.de/Veranstalter/teaser.php?vid=1099&count=10&t_high=all&t_kat=all'|file_get_contents}

Greets,
Gab

Andreas Zwinkau

Saturday 13 August 2005 9:40:14 am

Thanks! It works very nice.

Just to ask, if i did it the right way:
I created
settings/override/template.ini.append for the PHP function
settings/override/content.ini.append for the custom tags
design/corporate/templates/content/datatype/view/ezxmltags/insert.tpl for the template for the custom tag insert

Gabriel R.

Saturday 13 August 2005 10:02:26 am

Seems to be ok

risto CMS user

Friday 25 November 2005 5:19:38 am

would you mind showing the actual code you added? I cant seem to get this right!

Alexandre Cunha

Friday 24 March 2006 8:35:27 am

settings/override/content.ini.append  -  for the custom tags
design/corporate/templates/content/datatype/view/ezxmltags/insert.tpl  - for the template for the custom tag insert

Can someone help me ?
I need examples for the content.ini.append and insert.tpl
No understand why need change this files to allow include external html

http://AlexandreCunha.com