Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Use Textpattern with flat files
Hello,
I’ve always heard people complaining about Textpattern putting all the page codes & css in database. It didnt bother me much till the time when I had to create a huge site using Texpattern.
I know txp is best for micro blogging sites, but I’ve successfully pulled off pretty huge site with it. But for huge sites with good amount of traffic needs to have everything fine tuned for page serving speed.
I’m already using external CSS file for a while. Then I thought I can even use external php pages. So I did.
I put all the code from pages into respective .php files and saved all of them in a directory called “templates” in the root.
Then added a small php code in place of page code for every page.
So it all looks something like this. This is code for default page.
<txp:php>
include('templates/default.php');
</txp:php>
This is working flawlessly and now I can edit all pages through ftp. But when I try to do similar thing with forms, the txp tags do not get processed. All other txp tags from pages work but not the one from external forms page.
So the questions are,- Is this a right method to get it work? Is it safe?
- Why forms are working but txp tags are not being processed?
Thanks for your time.
p.s. I had tried to look for solution to Textpattern with flat files, found a very old link for this, but it was dead, so I tried it myself.
Posting this so it might help someone in future!
Offline
Re: Use Textpattern with flat files
Offline
Re: Use Textpattern with flat files
vineonardo wrote:
p.s. I had tried to look for solution to Textpattern with flat files, found a very old link for this, but it was dead, so I tried it myself.
Posting this so it might help someone in future!
I also tried to find a more efficient solution, flat files little increase productivity, came to what is necessary to separate mathematics (logic) and static. That is, necessary to separate http frontend
and http backend
. Small comment about this
You can not just cache the css, js and full pages for a short time (5 -15 minutes will be enough to reduce the load many times.) You can also reset the cache to force the individual pages.
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)
Offline
Offline
Pages: 1