Answers.Body: <p>Calling the following works:</p>
  <pre><code>{% set nodes = craft.navigation.nodes().myField('myValue').all() %}
  </code></pre>
  <p>Obviously, switching out <code>myField</code> with the handle for the field, and <code>myValue</code> with the value you want to check.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-07T11:26:45.363Z
Answers.Text: This actually solves the question. Where can I learn what is going on in this chain of options? I'm not used at all to this format. Is this a Yii2 concept or something specific to CraftCMS? Thanks a lot for your help and for taking the time to test it. (In my tests I was convinced that the value was set because I was looking into the production database while using the dev environment, huge facepalm)
Answers.UserDisplayName: Álvaro Franz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-07T12:56:07.303Z
Answers.Text: This would be a Craft-specific concept, which deals with custom fields. In fact, it's the same for every element in Craft, and any element in plugins. Fortunately, Navigation Node's are elements, which can be queried. More info on elements - https://craftcms.com/docs/4.x/elements.html
  
  As for element queries (which you're doing here) there's some info https://craftcms.com/docs/4.x/element-queries.html#executing-element-queries
Answers.UserDisplayName: crawf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-07T11:16:17.463Z
Answers.LastActivityDate: 2022-10-07T22:32:48.833Z
Answers.LastEditDate: 2022-10-07T22:32:48.833Z
Answers.UserDisplayName: crawf
Body: <p>I wonder if it's possible to query navigation nodes by custom field when using the <a href="https://verbb.io/craft-plugins/navigation/features" rel="nofollow noreferrer">Navigation plugin by Verbb</a>.</p>
  <p>I haven't seen it in <a href="https://verbb.io/craft-plugins/navigation/docs/getting-elements/node-queries" rel="nofollow noreferrer">the documentation</a>.</p>
  <p>Suppose I have a Navigation menu with a field called <em>whateverField</em>.</p>
  <p>I want a query that looks something like:</p>
  <pre><code>{% set myQueriedNodes = 
  craft.navigation.nodes()
  .withField('whateverField).equalTo('whateverValue')
  .all() %}
  </code></pre>
  <p>Do you know if that's possible?</p>
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-07T09:26:55.290Z
Comments.Text: Have you tried to query by the registered type?
Comments.UserDisplayName: Max Strebel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-07T09:57:01.487Z
Comments.Text: @MaxStrebel No, but thanks for the hint. Looks like "registered type" means something like the custom post type in Wordpress? Something like "bypass the plugin query options and do it by native craft search"? Thanks!
Comments.UserDisplayName: Álvaro Franz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-07T10:35:13.890Z
Comments.Text: Oh sorry, I thought you meant you want to get nodes which use a custom node type.
  
  Have you tried: `{% set myQueriedNodes = craft.navigation.nodes().whateverField('whateverValue).all() %}`?
Comments.UserDisplayName: Max Strebel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-07T11:25:31.053Z
Comments.Text: @MaxStrebel - Actually, your last comment is the answer to this question. I'm accepting crawf's one. Thank you both for the attention and help.
Comments.UserDisplayName: Álvaro Franz
Tags: <navigation><plugin-navigation>
Title: Get Navigation Node by Custom Field
ThreadText: # Get Navigation Node by Custom Field
  
  (Asked by: username_0 on 2022-09-07)
  
  I wonder if it's possible to query navigation nodes by custom field when using the [Navigation plugin by Verbb](https://verbb.io/craft-plugins/navigation/features).
  
  I haven't seen it in [the documentation](https://verbb.io/craft-plugins/navigation/docs/getting-elements/node-queries).
  
  Suppose I have a Navigation menu with a field called *whateverField*.
  
  I want a query that looks something like:
  
  ```
  {% set myQueriedNodes = 
  craft.navigation.nodes()
  .withField('whateverField).equalTo('whateverValue')
  .all() %}
  
  ```
  
  Do you know if that's possible?
  
  Thanks!
  
  **Tags:** navigation, plugin-navigation
  
  > **Comments:**
  > **username_1**: Have you tried to query by the registered type?  
  > **username_0**: @username_1 No, but thanks for the hint. Looks like "registered type" means something like the custom post type in Wordpress? Something like "bypass the plugin query options and do it by native craft search"? Thanks!  
  > **username_1**: Oh sorry, I thought you meant you want to get nodes which use a custom node type.  Have you tried: `{% set myQueriedNodes = craft.navigation.nodes().whateverField('whateverValue).all() %}`?  
  > **username_0**: @username_1 - Actually, your last comment is the answer to this question. I'm accepting username_2's one. Thank you both for the attention and help.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-09-07. Score: 1 | Accepted answer
  
  Calling the following works:
  
  ```
  {% set nodes = craft.navigation.nodes().myField('myValue').all() %}
  
  ```
  
  Obviously, switching out `myField` with the handle for the field, and `myValue` with the value you want to check.
  
  > **Comments:**
  > **username_0**: This actually solves the question. Where can I learn what is going on in this chain of options? I'm not used at all to this format. Is this a Yii2 concept or something specific to CraftCMS? Thanks a lot for your help and for taking the time to test it. (In my tests I was convinced that the value was set because I was looking into the production database while using the dev environment, huge facepalm)  
  > **username_2**: This would be a Craft-specific concept, which deals with custom fields. In fact, it's the same for every element in Craft, and any element in plugins. Fortunately, Navigation Node's are elements, which can be queried. More info on elements - https://craftcms.com/docs/4.x/elements.html  As for element queries (which you're doing here) there's some info https://craftcms.com/docs/4.x/element-queries.html#executing-element-queries  
  
  ---
  
  