5

Coming from a Drupal 7 background but wanting to do more work with WordPress, I am looking for ideas on how people approach "the things that you would normally use Drupal views for".

For any WordPressers that are unfamiliar with views, I'll try and explain it in once sentence: it is a UI that allows you to run queries on your DB and format these nicely on the screen.

Tools with a GUI are nice, though not necessary - I'd be happy coding stuff. Just thinking that it would be great if there was a framework / set of libraries that I could use, to avoid too much wheel reinvention.

To give a bit of context: I'm creating the data entry part of a monitoring and evaluation system. We'll most likely use Caldera forms for the actual data entry but I want to create a customized dashboard that front end users of the site (without any other access to CiviCRM) that will give an overview to users of what they need to do and point them towards the forms that they need to fill in, etc. Happy to provide more details if that would be helpful.

Tips and tricks and examples are very welcome.

1

Interesting, we (as in CiviCooP) are on the same quest. We will do a work-together on 9 November and I expect one of the projects coming out of that to develop a View-type of Wordpress plugin. Want to join us if we are going to do this in a sprint?

  • 4
    I'd be reluctant to see another Views-like plugin for WordPress. There are already a number of them and IMO it makes more sense to build compatibility for, say, Content Views than to build from scratch. – Christian Wach Oct 18 '18 at 9:31
  • Totally agree @ChristianWach... investigate what is already there would be the first point of investigation :-) And if we do not have to develop we will certainly not! However, we do have to take into consideration that CiviCRM might be on another server than the CMS? Any suggestions? – ErikH - CiviCooP Oct 18 '18 at 13:59
  • Content Views seems like a viable/potential solution and we've done a very basic proof of concept, there are a couple of screenshoots on Mattermost here – Andrei Oct 18 '18 at 16:44
  • I've put the 9th in my diary. Not sure how much use I will be, but will certainly try and help :) – michaelmcandrew Oct 19 '18 at 14:49
  • Neither do I but it will be fun @michaelmcandres – ErikH - CiviCooP Oct 21 '18 at 11:51
1

See this question first: What is the recommended Wordpress equivalent for drupal-views for some ideas and then consider the Views plugin for WordPress, what they call "the Query Builder for WordPress."

Then of course there is the Query Wrangler plugin.

  • thanks @hershel - for some reason my searching did not turn up that question – michaelmcandrew Nov 1 '18 at 9:12
0

A wordpress plugin "Query Wrangler" provides some basic functionality similar to that of drupal views module.

  • thanks for that @hassan - do you have experience using this with civicrm entities? – michaelmcandrew Oct 21 '18 at 22:05
  • Do you mean drupal module "CiviCRM Entity"? – Hassan Farooq Nov 7 '18 at 20:03
0

For simple table views, I find that CiviCRM custom searches usually do what we need :

  1. display a table of results with the columns and data you want
  2. allow to add some filters

Advantages :

  • it's CMS agnostic
  • you can do the filters you need (or no filters if you don't want any)
  • you have full control on the generated query (functions like select(), from(), where() or sql() if you want to have a very specific query)
  • you get all the usual searches actions for Contacts (add to group, create a smart group, export, send an email...)

Drawbacks :

  • you need programming skills (but it's no so hard)
  • for other than table display, you need to create your own .tpl and you might have to do quite some work

I can't find any recent documentation but you can find this page : https://wiki.civicrm.org/confluence/display/CRMDOC42/Create+a+Custom-Search+Extension

0

Work is happening to make https://github.com/mecachisenros/content-views-civicrm useful

Referenced here https://chat.civicrm.org/civicrm/pl/g9913yqt1tnmdesc85g6m34xph

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.