I've installed the module and activated it. I honestly don't know what to do next. I've read your documentation about 30 times and the referenced http://drupal.org/node/723792 near as many but still have no idea. I'm not a programmer- I can barely understand php... I'm only a themer and new to drupal. Oh.. I've never created a module (obviously). I understand that this module is primarily for developers, but I need it on about 3 sites right now and I'm sure there must be a way that I can understand this.
People are giving code examples to explain function or process in this thread: http://drupal.org/node/723792. I have no idea what they mean.
1. From the documentation, it looks like I need 3 elements: a context, a view, and a custom module that works with this contributed one?
2. I can set up a context. I can also set up some views....which comes first?
3. When creating a custom module, I'm assuming that I go to sites/all/modules/ (or preferred directory) and create a directory with my custom module name. Then copy the .info and .module files per your directions in the current documentation... name them and put them in my new module directory. I'm still unclear on what to replace in that .module file though. It looks like this line:
if($node->type == 'department') {
takes the machine-readable name of a content type as defined in the content type settings?
What is a namespace and where do I find it?
What is an attribute and where do I find it?
Can I supply multiple content types in this module or just one per module?
Or is the order of things:
1. Your module
2. my context
3. my module
4. my view
Could you lay out a step-by-step for this? I'm willing to help with it if I can?
PS: This module is truly amazing. However, it was impossible to find. (myself and a friend spent hours looking for it and even he even started building it!) I kept searching for reverse node reference block and shared field reference block and even shared field block. Perhaps if you add some of these terms to your project description, it would be found and downloaded more. It's a widely needed feature.
Comments
Comment #1
brynbellomy commentedYou actually don't need to set up any contexts in the Context UI for this module to work. It uses the other type of context that only developers generally deal with (same module, but slightly different functionality, not available in the UI).
If you can tell me exactly which arguments you're trying to pass to your Views, I can give you more specific instructions. You may not actually need a helper module, because views_arg_context automatically makes available certain very basic pieces of info (node title, nid, node type, and author uid, if I remember correctly). You can get pretty far with these, and none of them require anything beyond 1) enabling views_arg_context and 2) building your View in the Views interface. Give me a little more backstory and I'll be happy to give you a hand.
Comment #2
brynbellomy commentedComment #3
Yanxi commentedHi Bryn, I'd like to pass 5 arguments of CCK fields in Story content type to my block views so that the block views could be displayed dynamically according to the changing path .../field1/field2/field3/field4/field5. Is that possible? If so, how should I create my helper module? The same as Matt, I am not a programmer, and have no idea how to change the example code below in the document to fit my needs.
Would really appreciate it if this could work out.
Comment #4
mattsmith3 commentedHi brynbellomy. Thanks for getting back to me on this. Sorry I was away for a while.
I actually want to use this on several sites. The first has a set up like this:
I have 3 content types. Business Profiles, Customer Stories, and Employee Stories. Customer and Employee Stories both reference Business Profiles (using noderelationships for this).
On the Customer and Employee Story pages I'd like to have 2 blocks: Other Employee Stories about this Business, Other Customer Stories about this Business.
I would also like to have 2 blocks on the Business Profile pages: Recent Customer Stories about this Business, Recent Customer Stories about this Business.
So, that's a total of 6 blocks, 2 for each content type.
Comment #5
walidvb commentedHi! I'm having trouble using this as well..
I'm trying to get the node i'm visiting id as an argument, to be passed on to my filter, which will filter only the pages that have a reference to the node i'm visiting ( (relationship)nodeID = %1)
I think I am doing the right thing, by choosing (if no arg provided, use -> PHP Code:) Node ID from URL.
After a long discussion, i figured i should use this module, but i don't know how to!?
Would be very grateful of some knowledge sharing here! :)
Comment #6
kclarkson commentedI need help with this as well.
I am only trying to use the "Automatically generated Data" so I don't have to create a custom module.
Basically I am trying to show a lists of similar nodes by taxonomy.
I created a view that used the taxonomy term ID as the argument.
Settings are:
1. Provide the Default Argument
2. Default Argument type: Context
3. Basic Validation.
The error I am getting is:
* warning: preg_match() expects parameter 2 to be string, array given in C:\wamp\www\skyefitness\sites\all\modules\contrib\views\includes\handlers.inc on line 1023.
* warning: preg_match() expects parameter 2 to be string, array given in C:\wamp\www\skyefitness\sites\all\modules\contrib\views\includes\handlers.inc on line 1028.
* warning: html_entity_decode() expects parameter 1 to be string, array given in C:\wamp\www\skyefitness\sites\all\modules\contrib\views\handlers\views_handler_field.inc on line 976.
* warning: html_entity_decode() expects parameter 1 to be string, array given in C:\wamp\www\skyefitness\sites\all\modules\contrib\views\handlers\views_handler_field.inc on line 976.
* warning: html_entity_decode() expects parameter 1 to be string, array given in C:\wamp\www\skyefitness\sites\all\modules\contrib\views\handlers\views_handler_field.inc on line 976.
Comment #7
SunRhythms commentedHow would I set up the namespace and attribute if it were for a tag (given the nature of tagging where a new user may not have entered it until they create a profile or content)