Hello! I really need your help about this.
So, I've searched a lot of topics about ways to compare nodes, but the only thing I found was a topic which had no answer or at least not satisfying enough. My problem is that I'm building up a digital library, which contains classic ancient greek texts, using also Glossary.module, and the client needs to have the ability to compare texts inside. It's pretty simple I guess, something like two dropdown menus at the top of the page with all containing texts and a compare button, which when pressed will lead to a custom page, separated in two columns each containing the chosen text. But I really haven't got the slightest idea of how to make it work, although I need it so much.

Any idea how to do it? Please help! Thanks in advance.

Comments

zeta ζ’s picture

I’d start with investigating Views myself. Parameters might give the drop-downs.

Theming and maybe some templating will give the side-by-side layout.

zeta ζ’s picture

Now that <code> is looking better again on d.o.
Check Multiple Views on single node and How to Embed Two Views on the Same Page.

wH1spEr’s picture

Separating content in two nodes seems the easier job, I guess it could even be done using a modified panels.module. The hard part seems putting all the content on the site into those dropdowns, and mostly the generating process of a whole new page. I guess that page should exsist only on smth like template, not like in panels.module - as static content.
Something has to generate a comparison page with the results. I tried to use parts of e-commerce modules but they don't fit for this job.

Anyway, thanks for the support :)

zeta ζ’s picture

Separating content in two nodes

I thought you were combining content into one page.

The hard part seems putting all the content on the site into those dropdowns

Views arguments should be able to do this.

I don’t understand the rest of your post.

anshuman’s picture

So basically, you want to pick 2 nodes, and display them side by them in the single page, right ?

I have been trying this myself, and I have settled for the following approach -

1) install the Panels module (http://drupal.org/project/panels)
2) create views - view1 and view2, each having arguments (http://drupal.org/node/54455) for its filters (http://drupal.org/node/54457)
3) create a 2-vertical-blocks panel, and assign view1 for left pane and view2 for right pane
4) call the panel from your "submit" action, pass on all your arguments

View1 and View2 will both get the arguments which the panel was passed on to. The individual views can then render as per their own logic. Finally, we would have 1 submit action rendering 2 views , side by side, layout being governed by the panel design.

Would that do for you? Whats are the roadblocks?

are you referring to arranging the content as drop-down menus, as the bigger problem?

vkr11’s picture

I am also looking for something similar.
Using your approach how do you go about having the name of the feature on the left and the data on two diffrent views?
Say you have two nodes of camera - c1 & C2. I would like to have something as below:

Feature......................C1..................C2
LCD Screen..................2.5 inch.........2.0 inch
Mfr.............................Sony.............Nikkon
Memory.......................SDCARD.........MiniSD
Price...........................$300.............$400
Rating.........................xxx...............xxxxx

With panels won't the feature column repeated twice?

anshuman’s picture

So basically you want 3 columns, 1st having a list of values and other 2 as nodes, and display them side by them in the single page, right ?

Well you can use a 3-panel structure.

1) install the Panels module (http://drupal.org/project/panels)
2) create views - view1 having list of values (features), while view2 and view3 will be having arguments (http://drupal.org/node/54455) for its filters (http://drupal.org/node/54457)
3) create a 3-vertical-blocks panel, assign view1 for left pane, view2 to middle pane and view3 for right pane
4) call the panel from your "submit" action, pass on all your arguments

View1 is static, while View2 and View3 will both get the arguments which the panel was passed on to. The individual views can then render as per their own logic. Finally, we would have 1 submit action rendering the views , side by side, layout being governed by the panel design.

Would that do for you?

AbhyK’s picture

in our views we are generating two different courses values by passing nid as arguments which are pointing to different courses

now the problem is while comparing the these courses the values on page, it is considering only first nid and hence generating

values same for the same nid not for different nids

url is 77%2C78 where 77 and 78 are nids

now in two columns it gives values only for nid 77

how differentiate these nids so that values for two seperate views on same page can be different???

any suggestions are welcome @ abhijeetkhewale@gmail.com

vkr11’s picture

I have put a bounty for this on the paid Drupal services, if any one of you are willing to chip-in, it would be easiar to get it developed.
http://drupal.org/node/231393

- Victor