Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Two versions of the same site from one copy
Hi Peeps,
Cant think how to do this. I have a news site built for a client, which is updated quarterly. The client sends an email to people each time it a new edition is available. The problem is they send it to two sets of people. Both see the same site except for one difference – one set needs to be able to see an extra section to do with special offers. This section needs to be invisible to the other group of people.
How can serve this extra section without cloning the database and running two copies of the whole web site?
Help me Bloke your my only hope!
Thanks.
Offline
Re: Two versions of the same site from one copy
Some ideas:
You could try something like ied_if_domain to serve the same information to two different domains, or to a particular subdomain. Using ied_if_domain you can display certain information only on one of the sites. You would then email each set of people a different link.
Another alternative might be to set a cookie for the set of users who are able to view the extra section:
- Send recipients who may see the “extra” information a link with an extra url appendage, e.g. www.domain.com/?visitor=special. Then use something like adi_gps to test whether the urlvar “visitor” equals “special” and if so set a cookie with chs_cookie.
- You can also use chs_cookie to test for existence of the cookie so that only those people with the cookie set see the extra sections.
Both of the above are filters of a kind and not 100% secure. If you need ‘ultimate security’ you can give each of your “special users” a login and use ign_password_protect to password protect the extra content.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Two versions of the same site from one copy
Thanks Jakob. The ied_if_domain route might be the way to go. The stumbling point might be that I possibly cant use a subdomain, but i will give it ago.
Cookies fall fowl of cache cleaners so thats not a perfect solution for me.
Thanks alot for you help.
Offline