2

I'm new to Drupal. I'm working on existing Drupal Website. This is a multi-site with single Drupal Setup.

There is a side-bar on the website that contains a view for News of website. I want to create another view like "News" and put it to below the "News" view inside the same block.

The new view will contain events instead of news and those events will come other websites (other websites is the sites from multi-sites, I have total 3 websites in multi-site setup).

Please help me to do this. Please let me know if I need to share more details.

2

I am assuming that the view that is already in use is of type block.

You can clone the Block using the views admin UI.

1)Go to Structure -> Views

2)Click on the Edit link corresponding to your view

3)Click on the block you are interested in copying and select the option "Clone Block" from the dropdown.enter image description here

4)A copy of the block gets created. Update the title of the new block , make the necessary changes to the filters etc and save.

oops!Missed out the important piece "

The view should display the events which are currently available in a different site

"

From what I understand the multi-site setup is achieved using the Domain Access module. So the drupal instance and the DB are common for all the sites.

In your case you need to make the events content available in the domain where you are creating the view. To do this 1) Go to Structure -> Content Types

2) Click on the edit link corresponding to the Events content type

3) Click on "Domain Access Settings" at the bottom

4) Select the Domain where the events view is going to be added and save.

5) This domain access setting gets applied to all the new events which get added after the change.

6) The existing events might have to be manually updated to make them accessible in the different domain. Go to the edit page of each specific event and update the Domain Access options accordingly.

  • after cloning the block, how can I place it on the page? – Amit Thukral Apr 1 '16 at 9:17
  • You can place just like the way you add any other block. Go to Structure -> Blocks. go to the block you are interested in and add it to the region of choice. Refer to drupal.org/node/171224 – Bhuvana Apr 1 '16 at 9:19
  • Sorry ! Missed that. Updated my answer now. – Bhuvana Apr 1 '16 at 9:54
1

The new view will contain events instead of news and those events will come other websites (other websites is the sites from multi->sites, I have total 3 websites in multi-site setup).

I could be wrong, but I don't think multi-site with single Drupal Setup lets you share content from 1 site to another.

From what I've heard is that you need to use

Domain Access

The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The module allows you to share users, content, and configurations across a group of sites

Intro Video

  • Domain Access is already used in the website. I just want to create another view and put it below existing view. – Amit Thukral Apr 1 '16 at 8:54
1

To my knowledge there is no solution to make this works with (only) Views. But if you're willing to use the Forena module, you could make this work as detailed below ...

Forena has an integration with the BEAN module, as explained in its documentation about Bean Integration. So you can create your News block via this integration.

To actually build such block, you'll basically have to do 2 things:

  1. Write your appropriate SQL statement (to create what is called the "data block", stored in an SQL file in your file system). If you're an SQL expert you just write the SQL, as an alternative you can use the WYSIWYG Query Builder (think of using PhpMyAdmin within a Drupal admin interface).
  2. Create a "report" which will actually display the query results of your data block and format it to fit your needs. The specifications (design) of this report is stored in what is called a .FRX file, which is basically a file in XHTML format. You can use the WYSIWYG Report Writer to have Forena guide you in the creation of this report (which will save it as a .FRX file). More experienced Forena users will more and more just create/modify the .FRX files directly.

What is above is a high level overview of how to build such News block with Forena. What is left is to do something which is pretty similar for creating your Events block. The clue for this part here is that when you're defining a data block, you do so by referring to a "database connection". So to build your News block, the approach is similar, but it only points to the data of your other site(s). In this case it's pretty easy (its also a Drupal database), but it could even have been an Oracle, MS SQL, Postgress, etc database also.

For (way) more details, head over to the Forena Documentation included with the module (or its equivalent in the demo site). Or have a look at various questions around here tagged with ... and add your own questions if needed (using this tag).

Disclosure: I'm a (co-)maintainer of Forena.

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.