Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-12-04 01:13:17
- macinchik
- Member
- Registered: 2007-02-08
- Posts: 17
option to output static files?
I’m building a site that is a hybrid of my own framework and that of Textpattern. I want to selectively include different chunks of content from TXP within existing PHP pages. I can’t use a regular include, since all the TXP “pages” are generated dynamically. Client side includes seem terribly brittle, and the option to do a PHP http:get is turned off on my server’s installation.
Which basically has left me with iframes, which for me, is not optimal.
Are there any other ways to accomplish what I’m trying to do?
Many thanks,
Jenn
Offline
Re: option to output static files?
This is an interesting idea. With a bit of work, I imagine the Textpattern code could be refactored a bit so as to isolate the page generation code into a library. The idea would be to end up with a master function, something like “publish($url),” which would be able to generate the page contents for a given URL without messing with any of the http protocol-specific bits or web server environment bits (that would be the responsibility of the caller). Then you could embed this library into any php app or framework and be able to grab pages at will. Pretty cool!
Offline
Re: option to output static files?
Try the opposite: including bits of PHP in TXP instead of including TXP in those bits of PHP
Offline
Pages: 1