0

I created a content type containing a select list field (ie Fruit, Food, Jewelery etc).

I am not using any node reference nor any taxonomy vocabulary.

I have added a static select list. I want to show related nodes under the current node. I.e if I visit a node containing the fruit category, then all the other nodes containing fruit category should be shown below the current node.

  • so, you want a dynamically loaded reference field, but without using a reference module? You need to either use a Taxonomy and use the built in systems, or use node reference , entity reference or some other reference module (even if you write your own) to accomplish this – Geoff Apr 30 '15 at 16:20
  • i know it is possible and also easy to accomplish this task with taxononmy terms or with node reference but i clearly mentioned in my question that i am using static select list. I just want to do with this select list. – WaQaR Ali May 4 '15 at 4:52
  • and I'm saying that's not possible based on how your question is worded – Geoff May 4 '15 at 12:22
  • no it could be complex but not impossible, as i am trying to do tihs and iam sure i will get the solution soon – WaQaR Ali May 4 '15 at 12:28
  • you want to dynamically reference nodes, without using anything to reference the nodes, contrib or custom. That's like saying I want to drive a car, but it can't involve a car when I do it... – Geoff May 4 '15 at 13:12
0

Your persistence on not using taxonomy is interesting . any way to make it happen you will need to use Panels , create a view of type content pane , add a contextual filter , filter your content based on your field , then you will need an argument for your filter , in the pane settings you will find a argument setting , pass your content field as argument , then in page manager in node view add your created pane . (don't forget to restrict node view to your content type) Check The views Context for more help.

0

I recommend converting your select list field to Taxonomy and use a module like Similar By Terms.

This Drupal module attempts to provide context for content items by displaying a block with links to other similar content. Similarity is based on the taxonomy terms assigned to content. Blocks are available based on similarity within each of the defined vocabularies for a site as well as a block for similarity within all vocabularies.

  • your suggestion is good but this is used with taxonomy terms and i am not using taxonomy. So not the solution of my problem. – WaQaR Ali May 4 '15 at 4:54
  • @WaQaRAli any reason why you aren't using Taxonomy? I could be wrong since I don't know how your site is set up and all sites are different but if you are trying to get related nodes it sounds like you should be using Taxonomy. It may be more work to fix but this now but if you do you will be taking advantage of Drupal's robust taxonomy system. If updating to taxonomy isn't an option then you will need to create a custom module and create a custom block that runs a query to get the related nodes. – albertski May 4 '15 at 20:49
  • the only reason here is that i already have been used taxonomy for this purpose and that also works for me but now i want to do the same thing by using static select list. – WaQaR Ali May 5 '15 at 6:19

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.