matjazp Posted November 8, 2015 Share Posted November 8, 2015 I would like to have access to another site running PW on the same server from my templates (and modules). I would like to use PW APIs, from both "servers", something like: $pages->find(some_selector) would find pages in "local" PW $pages_remote->find(some_selector) would find pages in "remote" PW Is it possible? Link to comment Share on other sites More sharing options...
arjen Posted November 8, 2015 Share Posted November 8, 2015 Hi matjazp, this is possible with the Pages Web Sevice. You can do anything with this web service that you would do with a $pages->find() call. This module essentially provides a safe front-end to the AJAX API provided in the ProcessPageSearch module, enabling that capability to be used outside of the admin. 3 Link to comment Share on other sites More sharing options...
MuchDev Posted November 8, 2015 Share Posted November 8, 2015 In pw 3.0 (still in alpha) there will be the ability to call your other instance of processwire directly from the api. What exactly are you trying to accomplish, there may be another method that may end up suiting your problem that some could help suggest, as I am sure you have noticed there are some really smart friendly people here like that guy ^^ Link to comment Share on other sites More sharing options...
matjazp Posted November 8, 2015 Author Share Posted November 8, 2015 I (client) might want to display news posts from remote site on his site. I could connect to remote mysql and use db queries (hmm...no). I could parse rss feed (then you have it all and not just what client needs). I know PW 3 runs in its own namespace, but believed something similar might be possible with current PW. Pages Web Service will do the job, will use it if client expresses a wish. Thanks to really smart friendly people here ;-) 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now