[support] Some guidance with views needed

Nik Derewianka nik at artofmultimedia.com.au
Tue Jun 15 06:03:43 UTC 2010


Hi all,

Hope you can help me a bit.  I have two node types, Company and Division, Division has a node reference to Company. The view has exposed filters for Node Type=Company or Division, Division Title and Company.

Currently the view correctly returns all of the Divisions within a Company when you select a Company from the exposed filter, however, what i need to do is to modify the results so that i show the Company node that the view has been filtered on at the top of the results.

What I am having trouble with is knowing where to add the code to modify this result.  So far i have been trying to insert this via template files without much success:  I can see that the Company drop down filter has node id's in the #value that would allow me to do a node_load, but this seems to only be available in views-exposed-form.tpl.php and doesn't seem to allow me to output the node information before the rest of the view.

i.e.
Select company B in exposed filter would result in:

Company B node
Division of Company B node 1
Division of Company B node 2
Division of Company B node 3
Division of Company B node n


Where should i be looking to intercept the display of the view so that i can insert the company node at the top ?
Should I be looking at hooks or template files ?
I have already messed around with relationships, but that doesn't seem to be giving me the correct result that i require.

Any assistance would be greatly appreciated.

Regards,
Nik


More information about the support mailing list