I have a content type that has an entity reference field allowing you to link to other pages and add a custom image, for nice big CTAs.

However, it's come to light that some of the links may need to be to Views that show content as a list or map.

The ER field has autocomplete enabled and it can't find the view by its URL e.g /my-view

Is there a plugin that would allow the field to find Views? Or do I have to change the content type and add a Link field instead?

  • As it's an entity reference field, and views pages aren't entities (views are, but its the page display which you want to link to, not the underlying view), you cannot use this field for this purpose. A link field will be a better choice in this case. There's a plugin you can use to include views pages in the autocomplete, just hunting for it, brb. – Alfred Armstrong Jan 29 '18 at 14:13
  • Turns out I was thinking of linkit_views, which is not relevant to this case, sorry. – Alfred Armstrong Jan 29 '18 at 14:26

One way to handle this is to make the view page into a block, then create a node with no content that contains this block (block placement in main content with limited view to /node/. Then use this in the entity reference field.

An alternative might be to have a content type that uses one of the views fields like view reference. Then just create a view node with the desired view and use it.

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.