Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: How to include a Textpattern form into an external PHP page?
Hi-
Could you have a default section that will be served if a section doesn’t exist — sort of like a 404 page. You can put the code in the form. Maybe this doesn’t work?
Jonah Calinawan
www.foodportraits.com
Offline
Re: How to include a Textpattern form into an external PHP page?
Hi Jonah… maybe I should give a slightly more detailed explanation
What I did was that i created pseudo sections- that is content without any head tags (A no-no in txp semantics I know-but very much the same as your example earlier in this thread:). Within them included code which I would normally use in forms. I the ‘call’ these ‘sections’ using your provided code in parts of pages in a second url…
example can be seen on neme-imca.org. The page ‘fetches the “NeMe Activities” and “Current NeMe Calls” using your code… also the sitemaps on neme.org and neme-imca.org are generated using the if_different tag and then brought together with your snippet:)
The reason I asked re suppression of errors is because i recently mistyped a section name and the whole page and when I tried to view the page the whole of it was blank as opposed to just the area was was supposed to be fetched. A typo can be corrected but a site failure due to server problems will cause both sites to go under.
Last edited by colak (2008-01-24 16:51:55)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: How to include a Textpattern form into an external PHP page?
Hi-
Have you tried replacing “require” with “include”? The difference between require and include is how they handle errors. Maybe this would help?
Last edited by JonahC (2008-01-24 17:20:28)
Jonah Calinawan
www.foodportraits.com
Offline
Re: How to include a Textpattern form into an external PHP page?
that did it! Thanks Jonah!
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline