Drupal combine nodes and comments in view - drupal-7

I have a view with nodes of the type 'Note' (custom CT). I have A view with comments that are associated with those nodes. How can I combine these views into one view so that I can filter them individually on the date ?

The simple way would be to make one view with notes and comments both in it and then using contextual filter to get the date.
Alternatively, to get them in a top wth notes and a bottom with comments, use attachment displays to get two views into one. Make your top view, then use 'Add+' where the page and block buttons are (top left) are to select a new 'attachment'. Make new view here then add the two together with 'Attachment Settings' then 'Attach to' and choose your first view. Magic!

Related

2sxc Dnn.. Add existing content items to module

I have a view of entities which are being displayed based on an entity type filter. I now need to reorder these and would like to use the built in 2sxc functionality to do this, so I have a created a new view of the data using the "module data source" so that the ordering will work.
But how do I now make all of the existing entities of the same type (definition) appear in this new view? The view now displays one item by default and I can replace that one item. But how do I add multiple existing items? I need the Entity ID's to remain the same for Query String usage and SEO.
Thanks, hope the question makes sense.
Cheers
I believe that you are asking "how can I add many items to an instance (module) manually, so that I can also sort them manually" - is this correct?
If yes, then you must make sure your template supports lists (checkbox in the template settings). This then gives you a [+] button; but you don't want to use that, as it would be for typing in new data. There's another button called "add an empty demo entry" which you'll see as a round (+) after pressing the more ... button once. Pressing this will give you empty entries, into which you can then replace existing items.

Loading empty form

I have a page with 3 containers, the top will be used for search form, two the left side will have the adf form and the right a table view. One thing to note is that all the 3 sections will be using the same View Object or inturn the same table. When the page is loaded I want my form to come in the createInsert view. I tried using the invoke criteria for the creatInsertaction but this is messing up my search, since the form is empty and if i do a search in the search form the validators in the ADF form will fire and every thing goes for a toes.
Please suggest any solutions for this.
Use different view instances. Probably 1 for the search and 1 for both the form and the table.
Some basic info about view instances: http://andrejusb.blogspot.be/2011/06/understanding-adf-bc-view-object.html
You can use the same viewObject but add some viewCriteria for the search part, and use a CreateInsert in your taskflow before show the view.
use mange-Bean and do create insert pragmatically inside the constructor .

how to use view ticker in drupal

Does anyone explain me how I can use Views Ticker.I loaded modul but no idea how I should use it.please explain me step by step ,I am new on drupal
thank you.I wanna do somethink like this link
enter link description here
Create a "content type" and name it anything in my own case I will name it "news"
To create a content type, navigate to administration->structure->Content type-> add content type
You can add new fields to the content type if you wish. But in my own case I will just use the default settings, since I need only the titles to appear as flash news headlines so click "save"
Next create a new view and name it anything in my own case I will call it "headlines"
To create a new view navigate to administration->structure->views->add new view,
Now setup the new view with the following attribiutes; {View Name = headlines, show = content, of type = news, sort by = Newest First, create a page = uncheck, display format = Views Ticker, of = Titles (Linked)", use a pager = unchecked, create a block = checked} now click save and exit
Next navigate to Blocks and enable the block we just created through the views. Check for the block name "headlines" and specify the location where you will like to place the newly added block and save.
To enable the block navigate to Administration->Structure->Blocks
Now Navigate to view and select the new view we just added. In my own case it is called "headlines" and make sure "Format" is set to View Ticker, you can customize the settings of the View Tick by click settings.
Next add a news content type using the content type we just created. Add a title, a summary and a content. Then hit save
To add a news content type, navigate to Add content
Tip: Add at least two news contents in other to see the full effect of the view ticker
There is "Some" documentation in the readme file. check it out and see if it fits your requirements, http://drupalcode.org/project/views_ticker.git/blob/refs/heads/7.x-2.x:/README.txt
From first glance it seems like a views plugin so you could probably try changing the dispaly in the views settings.
Yes, you need to create a new View that pulls in some kind of content (i.e. Announcements). Under the "Display Format" when creating the View, you'll see an option of "Views Ticker", if you've installed the module correctly.
Based on the example you pointed to, you'll probably want to create a Block at the same time, that you can insert into the desired region.
Once you've created the View, you'll see a link for the Display Format "Settings". This is where you choose whether to make it scroll horizontally, vertically, speed, etc.
Once you updated and saved the view, you should go Admin > Structure > Blocks and insert your newly-made Views Ticker block into one of the regions (regions available will vary based on your Theme).
Then, as long as your permissions are correct, and you have actual content,you should see the scrolling ticker show up on the page(s) where the block shows up.
To use views ticker, it needs you to have an view which outputs some data.
I assume you have such a view. Then go to that view's edit page and set format to views ticker. You should have enabled views ticker module to get that option to formats list.
Then it will show you the settings window, in which you can set settings such as vertically, horizontally, BBC, etc styles for your data movement and respective speed etc.
After you did, click on apply button and then save button top of the view's edit page.
If all goes well it should display moving contents in the page/block related to that view.

Drupal 7 taxonomy blocks using Views

I have different nodes to which I apply taxonomy terms.
I want to display two separate blocks:
The first block should list all the taxonomy terms (HTML list would be fine) and each should be clickable.
The second block should list all nodes that have the taxonomy term clicked on the first block.
How would I achieve that? I am using Drupal 7 and the Views module. Thanks in advance.
You need to 2 block views for this.
But create just 1 view and the second view is already there in your default drupal views.
Follow this steps:
Create a view.
Select "Taxonomy Terms" for "Show" from drop down.
Select the related taxonomy vocabulary for "of type".
Click on Create a Block.
Click on "save & exit".
This will create your first view block with the taxonomy terms.
Now for the second block which should display all the node related to the taxonomy terms.
you just have to enable a view which is "Taxonomy Term".Go down words in your drupal view list there you will find this view in a disable mode. you need to enable it.
Now just override the view as you want to see that node page to display all the content related to taxonomy terms.Select the fields and filters according to normal view creation as we do.
Create a page for this second block and give path as you like.
Now use Context module(download if you don't have right now) to show the taxonomy terms block on the path you have given for views.
(Hope you will be knowing how to use context if not just leave a comment i will guide you for that)

Drupal 7 view custom templates

I have created 1 views which include the 5 types of content types nodes.
What i want to do is customize the view template.
The first 2 stories display in other format like complete title, summary and image
and last 3 stories only title.
How this possible using views.
Or i have to use $view=views_get_view_result() method
You can create the first 2 stories as a regular View (either a page or a block, whichever you want to use) and create the remaining 3 stories as an attachment to the first view.
In the View, you should be able to create an attachment which you can then attach at the end of the first View.
This way, you can have slightly different configurations for each view but still have them in the same View page or block like:
I've posted a lengthier, illustrated step-by-step on my blog at http://nmc-codes.blogspot.ca/2012/10/views-attachment-in-drupal-7.html

Resources