Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2016-04-24 10:31:36
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Same form on many domains
Hello,
I want to use the same pages, forms or CSS on 3 domains/sites.
site1.xxx is the master site (with the original pages, forms + css )
I want to call and insert these snipets on site2.xxx and site3.xxx, from the site1.xxx, (without do a simple copy/paste).
Any idea, with core components, plugins or PHP ?
Thanks … !
Offline
Re: Same form on many domains
Hi Jean-Pol,
if db are stored on the same host, with same login, this (called on site2) should work:
<txp:etc_query data="SELECT Form FROM txp_form WHERE name='something'" url="your_db1" markup="db" />
Just mind that eventual txp tags will be processed in the context of the calling site2.
If db are on different hosts/credentials, drop me a word, so I can amend etc_query
.
Offline
Re: Same form on many domains
Hi JP
You can use rah_external_output.
Offline
#4 2016-04-24 15:57:52
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: Same form on many domains
Thanks, etc and Dragondz !
@etc : db are on differents host.
@Dragondz : I’ll try tomorow.
Offline
Re: Same form on many domains
You could use rah_flat to manage forms & pages from plain text files.
This way, if all the websites are hosted on the same server, you can configure rah_flat to look for pages & forms from the same folder (ie: /home/sites/shared-assets/
).
And if websites are hosted on different servers, you could try this: store them on the “master” server, and access them via a mount (it could be mounted via sshfs, or nfs, or whatever you could use to mount a remote file system). If mounting is not possible, maybe you could setup some cron/rsync job that periodically copies the files from “master” server to the other servers.
Offline
#6 2016-04-26 18:51:11
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: Same form on many domains
@maniqui : thanks.
I try rah_external-output and that work.
Offline
Pages: 1