CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Can you display a Drupal view on a CiviCRM page?
Pages: [1]

Author Topic: Can you display a Drupal view on a CiviCRM page?  (Read 2276 times)

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Can you display a Drupal view on a CiviCRM page?
April 21, 2012, 05:04:05 am
Hi there

I have a new Drupal 7 install and a CiviCRM install both using separate databases.  What I'm trying to work out is... is it possible when you are looking at a CiviCRM page to see a 'view' of information from my Drupal data.

Here's what I'm trying to do...

I'm using Drupal to store animal records with a content type > animal and using CCK fields to gather the data.  I do have a reference to

An animal has an owner, for which I thought CRM would be good to use.

A user (for example the vet) can update animal data (Drupal).

A user (for example a receptionish) can update the owner's contact data (CiviCRM).

What I want is a means for the receptionist (possibly in a block) a view of all animals listed for that owner.

I have seen lots of posts integrating users between Drupal/CiviCRM but can't figure out if this is possible.

I've played around with with the CCK "CiviCRM contact" type of data store and while I can select a contact, what it does is create a new Drupal node rather than a link to the contact in CiviCRM.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Can you display a Drupal view on a CiviCRM page?
April 21, 2012, 07:22:49 am

I would store both animal and people data in CiviCRM

create a sub-type of individual called Animal (which kinda makes sense from  darwinian point of view)

create a relationship between the animal (pet) and the person (owner)

a better model and data is all in CiviCRM :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Can you display a Drupal view on a CiviCRM page?
April 21, 2012, 12:02:15 pm
I agree with Lobo that keeping all entities in CiviCRM probably makes more sense. But, for the record, yes, you could add a tab to a Contact View page and show there a Drupal View. This must be done with a custom module.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Can you display a Drupal view on a CiviCRM page?
April 22, 2012, 03:57:09 am
If I create a sub-type wouldn't that mean the 'animal' would have all the personal information that a 'person' would, eg email address, phone number, etc?  That wouldn't make sense.  The only relationships is that the animal may have an ex-owner, have foster owner, etc.

When you say 'custom' module, does that mean one doesn't exist as a contributed module?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Can you display a Drupal view on a CiviCRM page?
April 22, 2012, 05:14:41 am
Quote from: refinej on April 22, 2012, 03:57:09 am
If I create a sub-type wouldn't that mean the 'animal' would have all the personal information that a 'person' would, eg email address, phone number, etc? 

Correct.

Quote from: refinej on April 22, 2012, 03:57:09 am
That wouldn't make sense.

Don't underestimate the level of common sense of pet owners: http://www.mailpets.com/ :)

Quote from: refinej on April 22, 2012, 03:57:09 am
When you say 'custom' module, does that mean one doesn't exist as a contributed module?

Correct. It means one someone would write for you.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Can you display a Drupal view on a CiviCRM page?
April 22, 2012, 10:29:46 am

> Don't underestimate the level of common sense of pet owner

I would never do that.  I work for an animal charity and trying to find a solution for the vets to store information about new animal intakes, their veterinary records as well as previous owners, and if the animal has gone out to foster, etc

I think CiviCRM might be too heavily set for people so what I'm looking for is quite the reverse.

I did create a sub-type of Individual called Animal and set up two relationships of Owner and Foster Owner.

When creating a new Individual > Animal, there is an awful lot of empty fields that are not relevant to an animal, but there are a lot of additional fields I would need to add, such as admission date, passport ID, chip numbers, etc

To pass this on to a user as it is for adding new Animals would confuse them because I can foresee them thinking the contact details being asked (eg email, adress, etc) could be taken it meas the contact details for the owner when in fact those fields are for the Animal.


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Can you display a Drupal view on a CiviCRM page?
April 22, 2012, 10:35:50 am
1. I have a client who uses CiviCRM for horses and their owners. So, it can be done. :)

2. You can add whatever custom fields you need.

3. To make a subset of fields for users to add new Animals you could use a Profile or http://drupal.org/project/webform_civicrm and thereby not ever expose those unneeded fields.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Can you display a Drupal view on a CiviCRM page?
April 23, 2012, 12:53:57 am
In installed webform CiviCRM yesterday to play around with.  I was getting all sorts of unexpected errors, but will give it another go.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Can you display a Drupal view on a CiviCRM page?
April 23, 2012, 02:32:13 am
Our hobby was breeding Siamese cats, and I have used CiviCRM to keep track of all animals and all actions. I used the suggested approach, created Cat as a subtype of Individual.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

refinej

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7
  • MySQL version: 5.1.61
  • PHP version: 5.3
Re: Can you display a Drupal view on a CiviCRM page?
April 23, 2012, 03:01:08 am
Did you use the webform civiCRM as well?  I've tried this and by default it looks like the animal name becomes the user name, so a contact is set up that way in civiCRM.  I must be missing the point somewhere  :(

I also set up previously the sub-type
Individual > Animal

So the webform is set up with primary contact type as Individual with type of individual as Animal.
 
I need a solution that the equine charity I work for can input data about an animal admitted into it's care.  That animal can stay in our care for years, but it can also go out on foster, or return from foster.  Supporters also register an interest so we want to keep track of a relationship between the animal and supporter, as well as animal and foster owner.

The Animal page needs to show the Animal's friend as normally equines come in from homes in pairs as well as current contacts (list of owner, foster owner if out on loan, interested supporter, etc)

If an owner calls, then entering their name into the system needs to show all the animals listed under that person and links to go in both directions from Animal to Owner and Owner to Animal.

I'd love to use civiCRM for this - perhaps the penny just hasn't dropped yet!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Can you display a Drupal view on a CiviCRM page?
April 30, 2012, 11:31:33 am
Webform civicrm can help with data entry - I would set it up with multiple contacts on the form. Contact 1 should probably be the owner. Contact 2 should be the pet. You can then define the relationship. If a person might have multiple pets, you can add more contacts to the form.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Can you display a Drupal view on a CiviCRM page?

This forum was archived on 2017-11-26.