Discussion:
[TYPO3] Include static file in page
Drew Leske
2006-07-07 19:24:19 UTC
Permalink
This seems like something that would be brain-dead to do, and I haven't seen
anybody else ask this question, which makes me think it's so obvious that a
monkey (one, working by himself, in ten minutes) could get it done. So
apologies if this is the case, but I can't figure out how to include static
files in a Typo3 page.

I want to basically include it as a content element, or within one, so I can
wrap that content with static text.

I've looked at various options but I don't want to use iframes--which I
can't get to work anyway because no matter what I do, the RTE html area and
typo3 clean them out (even with: RTE.default.proc.allowTags = iframe ;
RTE.default.proc.HTMLparser_rte.tags.iframe.protect = 1 in the page TSConfig).

Getting frustrated, if anybody can help I'd appreciate it.

Drew.
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Olivier Dobberkau
2006-07-07 19:31:13 UTC
Permalink
Post by Drew Leske
I want to basically include it as a content element, or within one, so I
can wrap that content with static text.
hi.

look at this.

http://typo3.org/extensions/repository/search/sr_iframe/1.0.2/

just install an extension.

olivier
Drew Leske
2006-07-07 19:43:08 UTC
Permalink
Thanks Olivier,

But I don't want to use iframes--that was just a frustrated side note.

Besides, if I did, I don't understand why I can't just specify the tags when
I'm telling the RTE plugin to allow them, following the plugin's documentation.

Drew.
Post by Olivier Dobberkau
Post by Drew Leske
I want to basically include it as a content element, or within one, so I
can wrap that content with static text.
hi.
look at this.
http://typo3.org/extensions/repository/search/sr_iframe/1.0.2/
just install an extension.
olivier
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Olivier Dobberkau
2006-07-07 19:43:20 UTC
Permalink
Post by Drew Leske
Thanks Olivier,
But I don't want to use iframes--that was just a frustrated side note.
Besides, if I did, I don't understand why I can't just specify the tags
when I'm telling the RTE plugin to allow them, following the plugin's
documentation.
Drew.
Hi Drew.

from your post it was not clear what you wanted to do.
if you want to include content from a static file, like in an include,
there are many options. please specify...

olivier
Drew Leske
2006-07-07 19:58:24 UTC
Permalink
Hi Olivier,

Sorry if I wasn't clear. Yes, I want to include a static file in my page.

Like a server-side include, or include() in PHP. I don't want the page
itself to be a link to a static file; I just want to include the content
within my page.

The file would be autogenerated by an external script periodically.

Thanks,
Drew.
Post by Olivier Dobberkau
Post by Drew Leske
Thanks Olivier,
But I don't want to use iframes--that was just a frustrated side note.
Besides, if I did, I don't understand why I can't just specify the tags
when I'm telling the RTE plugin to allow them, following the plugin's
documentation.
Drew.
Hi Drew.
from your post it was not clear what you wanted to do.
if you want to include content from a static file, like in an include,
there are many options. please specify...
olivier
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Olivier Dobberkau
2006-07-07 20:16:24 UTC
Permalink
Post by Drew Leske
Hi Olivier,
Sorry if I wasn't clear. Yes, I want to include a static file in my page.
Like a server-side include, or include() in PHP. I don't want the page
itself to be a link to a static file; I just want to include the content
within my page.
The file would be autogenerated by an external script periodically.
go

http://typo3.org/extensions/http://typo3.org/extensions/

and enter grab in the search field...

hope this helps.

olivier
Matthew Manderson
2006-07-08 10:04:37 UTC
Permalink
Maybe you just need TSref and this simple method?

page.10 = FILE
page.10.file = fileadmin/gs/gs.html

Matthew
Drew Leske
2006-07-10 18:01:13 UTC
Permalink
Hi,

Thanks, that was one of the first things I tried, but no luck. I have added
that to TSConfig and no go. I also tried to just replace subcontent, but nada.

Drew.
Post by Matthew Manderson
Maybe you just need TSref and this simple method?
page.10 = FILE
page.10.file = fileadmin/gs/gs.html
Matthew
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Matthew Manderson
2006-07-11 10:30:20 UTC
Permalink
Paste your TS setup code that relates to the included external file here.
Matthew
Drew Leske
2006-07-11 17:06:27 UTC
Permalink
Post by Matthew Manderson
Maybe you just need TSref and this simple method?
page.10 = FILE
page.10.file = fileadmin/gs/gs.html
The problem I think was that I tried to do it in the page TS config--replace
one of the content elements or create a new one, without creating a
template. I guess this isn't possible: a new template needs to be created
just for this purpose (am I correct here?).

I don't want to just replace the entire page, because then I just get a
blank page. So I've created an extension template with the following in
the Setup:

tt_content.text {
20 = FILE
20.file = fileadmin/gs/gs.html
}

And that's it. It works, and it's better than including a plugin just to
get this functionality (maybe) but is this the best solution?

Thanks everybody for your help,
Drew.
Post by Matthew Manderson
Paste your TS setup code that relates to the included external file here.
Matthew
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Matthew Manderson
2006-07-12 09:17:50 UTC
Permalink
Post by Drew Leske
tt_content.text {
20 = FILE
20.file = fileadmin/gs/gs.html
}
No problem, great you found your answer.

Remember you can also import the page.20.file into a template marker in your
html template.

depending on your template implementation something like:

page.10.subparts.markerlabel = FILE
page.10.subparts.markerlabel.file = fileadmin/gs/gs.html

And put this marker in your html code

###markerlabel###This is replaced by TypoScript###markerlabel###

Matthew
Drew Leske
2006-07-14 20:50:30 UTC
Permalink
Post by Matthew Manderson
Remember you can also import the page.20.file into a template marker in your
html template.
page.10.subparts.markerlabel = FILE
page.10.subparts.markerlabel.file = fileadmin/gs/gs.html
And put this marker in your html code
###markerlabel###This is replaced by TypoScript###markerlabel###
Hi Matthew,

I did some work in pursuit of this more elegant solution. After some
mishaps I got it to work (my implementation needed a little more work
because I'm using the template auto-parser).

It looks pretty good, but it does require that every page include this
markerlabel subpart, which isn't a big deal.

Thanks for your help,
Drew.
Post by Matthew Manderson
Post by Drew Leske
tt_content.text {
20 = FILE
20.file = fileadmin/gs/gs.html
}
No problem, great you found your answer.
Remember you can also import the page.20.file into a template marker in your
html template.
page.10.subparts.markerlabel = FILE
page.10.subparts.markerlabel.file = fileadmin/gs/gs.html
And put this marker in your html code
###markerlabel###This is replaced by TypoScript###markerlabel###
Matthew
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Drew Leske
2006-07-14 22:06:11 UTC
Permalink
Oh for the LOVE of PETE...

Hopefully this will save somebody else a few hours. Here's the easiest way
to include a static file.

Use the "Multimedia" content element.

I thought I'd try it out to see if I could "trick" it into displaying HTML.
Oh, no need. Just give it an HTML file.

Thanks all for your help anyway,
Drew.
Post by Drew Leske
This seems like something that would be brain-dead to do, and I haven't seen
anybody else ask this question, which makes me think it's so obvious that a
monkey (one, working by himself, in ten minutes) could get it done. So
apologies if this is the case, but I can't figure out how to include static
files in a Typo3 page.
I want to basically include it as a content element, or within one, so I can
wrap that content with static text.
--
Drew Leske :: Systems Group/Unix, Computing Services, University of Victoria
dleske at uvic.ca / +1250 472 5055 (office) / +1250 588 4311 (cel)
Continue reading on narkive:
Loading...