Forums / Cotonti / General / how to include HTML file into .tpl

pieter
#1 2010-05-29 05:06
how to include HTML file into .tpl-file?

I want to include this in a tpl: http://pv.kruisstraat89.be/banner.html
... can we help you ...
ez
#2 2010-05-29 06:30
Hey pieter,

A tpl is basically a HTML file (with extra's).

Just try it
==- I say: Keep it EZ -==
pieter
#3 2010-05-29 12:49
I want to include it without copying the content.

I tried include:http://....
but it doesn't work.
... can we help you ...
Kort
#4 2010-05-29 13:27
{FILE "skins/sed-lite/somehtmlfile.tpl"}
SED.by - создание сайтов, разработка плагинов и тем для Котонти
pieter
#5 2010-05-29 14:45
It seems not to work.

- Is it needed for the file to be TPL? I guess yes
- Does need to be placed in the skin folder?
- Can it via a absolute path with http://wwww..... ?

Added 10 minutes later:


I guess it is better to make a plugin, because I need to put the rest also on the site.

I want this http://pv.kruisstraat89.be/banner.html on the index page
And this http://pv.kruisstraat89.be/ visible in the site-layout.

Does anyone have a easy example for me to start creating this plugin?
I am not that familiar with coding.
... can we help you ...
This post was edited by pieter (2010-05-29 14:55, 13 years ago)
ez
#6 2010-05-29 15:37
Pieter,

This is something I made VERY quick.. so no garantees here
I just removed things like <body> <head> stuff from your html
just put this code in solar.tpl (e.g.)

and add it to index.tpl like kort said..


==- I say: Keep it EZ -==
pieter
#7 2010-05-30 02:05
It was not that easy. Thx Ez for the help via MSN.

Thx Kort, but it did't worked for me like that. The html was looking for data in js files.

I used
<iframe src="http://pv.kruisstraat89.be/banner.html" width="200" height="142" frameBorder="0"></iframe>

And this worked.
... can we help you ...
ez
#8 2010-05-30 15:39
Yes off course...

In this case iFrame was a good solution.
I don't use that often (almost never) so did't think off that.
==- I say: Keep it EZ -==