Jump to content

retrieve data from drupal and show in pw


webhoes
 Share

Recommended Posts

another question.

A foundation has 2 websites. An old joomla site that contains article and a drupal website that contains back-end information about animals.

The joomla site is too old to do somehting with it. My first intention was to include the article to the drupal website as a front for their current website. That way I can use the back-end data also on the front-end.

But.. is it also possible to use a PW website for the front-end (all the articles, etc) and get some data from the drupal site to display on the PW website. Like the number of animals registered, etc. I find it easier to make a good front-end for PW.

The drupal website can be moved to a subdomain and the PW site to the main domain.

How can I pull data of the drupal website and do something with in in PW? Or is this a for from optimal solution?

 

 

Link to comment
Share on other sites

6 hours ago, webhoes said:

The joomla site is too old to do somehting with it. My first intention was to include the article to the drupal website as a front for their current website. That way I can use the back-end data also on the front-end.

Is porting the sites to PW an option?

Link to comment
Share on other sites

I am not sure what you mean @kongondo.

It is drupal 7 with some of the public modules installed and some custom.

They register animals on this website. These are clustered in specie specific groups (studbook). Per animal they note some data. I think there is also some bloodline comparison functionality.

This does cost them a lot of money on a monthly basis for support from the developer.

All this functionality in PW would save them a lot of money.

Link to comment
Share on other sites

On 06/09/2017 at 9:26 AM, webhoes said:

They register animals on this website.

This answers my question.  The site is updated regularly it seems.

On 06/09/2017 at 9:26 AM, webhoes said:

This does cost them a lot of money on a monthly basis for support from the developer.

All this functionality in PW would save them a lot of money.

Are you able to convince them to have it ported to PW then? They'd pay (in my reckoning) a pretty much one-off amount to have everything under one roof with little or no monthly running costs. But I digress.

Back to your question, some of your choices are: i) access the database directly (ii) use the JSON feeds as suggested by @dragan. The challenge with (i) is that the data you need seems to be in different tables (e.g. the groupings are probably their own table versus the registry of animals itself). That would mean writing some SQL to get what you need. Also have a look at their Views Datasource.  (iii) Use their REST/SOAP we services, e.g. RESTful, RESTFul Web Services and Services. I would go for option (iii). There's a number of videos and articles out there to get you started. This one is a good intro as well as the video here.

On ProcessWire side, since you are not accessing its database, one option would be to create virtual pages on the fly to display your data. This is only if you need access to PW API. It is just one option and there will probably be other ideas. However, for something as simple as displaying a table with the number of animals in some group, you can even use plain old PHP to loop through the data and create a table.

I am just brainstorming. I haven't done anything like this before so take my rumblings with a healthy pinch of 'salt' :). Whatever your choice of action, you'd need to get your hands dirty with this one.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

I can not get them to go to PW unfortenately. I would be able te rebuild the whole site in PW except for some specific import code that imports data from other (older) used windows application. I have no experience with that.

I agree it would be cheaper for them in the end if I would rebuild it. Basicly because I am a volunteer for this organisation and not a third-party.

Data views looks promising. I can make views with datasets I need and access them within PW. Basic setup would be like this

Drupal -> PW <- Visitors

It would hide the Drupal site from the general public and potential threats as this site has the sensitive information. The PW site would be the front for visitors and will serve as an attractive and informative website.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...