Needs work
Project:
Examples for Developers
Version:
3.x-dev
Component:
New modules
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Jan 2013 at 00:15 UTC
Updated:
2 Oct 2025 at 11:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
marvil07 commentedLinks to other full projects which exemplify views
Comment #0.1
marvil07 commentedLink to issues on example modules for views.
Comment #0.2
xjmUpdated issue summary.
Comment #0.3
xjmUpdated issue summary.
Comment #1
blazey commentedAttaching patch for 1). It contains hook_schema and corresponding hook_views_data implementation. hook_views_data template was taken from views.api.php.
Comment #3
blazey commentedAdded default view using fields defined in hook_views_data.
Comment #6
mile23Thanks for moving forward on this, @blazey.
If you name the interdiff as 'interdiff.txt', the testbot won't try and test it.
OK, this is a huge file of YML with no comments. We need a description of what this file is for, why given values were used, etc.
I know D8 doesn't necessarily need a .module file any more, but Examples does. We need a @defgroup for the API site, and a bunch of text describing what the module does, what it demonstrates, and how to see it in action.
We also need a page which will show us the view in action, and enough textual information to let a newbie know if they're even looking at the right thing.
See also the Examples module checklist: #2209627: [meta] Module Checklist for Examples
Also tests. :-) The test run failed because of branch blockers.
Comment #8
technikh commentedIf anyone landed on this issue like me looking for views integration with content_entity_example
https://www.drupal.org/node/2192175#comment-10758756
Comment #9
lukas.fischer commentedYes, please add "views_data" = "Drupal\views\EntityViewsData" to the examples code.
Comment #10
mikael berger commentedHello,
Hopefully this is the right place to post a suggestion, it has not been easy to find active discussions on views plugin examples.
I have a sandbox project at Uikit Slideshow which I think might be suitable as a Views Style Plugin Example. Albeit developed for a particular use case, it also shows how to pick individual fields in the views row and then employ them in the plugin's Twig template.
If you find my suggestion to be appropriate, please bear in mind that I am a newbie module developer. Needless to say, this means that I maybe would need some help and advise for moving towards Drupal's full project standards.
Cheers
Mikael
Comment #11
mile23Comment #12
bucefal91 commentedHello, guys!
Just recently I published a series of articles targeted to Drupal developers interested in advanced views integration for D8. https://medium.com/@oleksandr.trotsenko/drupal-8-views-tutorial-for-deve... It would cover points 1 and 2 from the main description of this issue. If you think any of those materials may serve for examples, feel free to grab it.
Comment #13
clemens.tolboomAdded to get listed on the Examples toolbar and menu links.
Comment #14
clemens.tolboomComment #15
clemens.tolboomComment #16
clemens.tolboomThe medium post by @bucefal91 in #12 looks great to reuse here. For relationship we need an extra table.
So maybe we could better change to the tables done by @bucefal91 and take over his code?
@bucefal91 I'm not sure I can take your code in here as there is no license. I guess you can but not sure.
Comment #18
clemens.tolboomWow ... 8 days waiting ... weird.
@bucefal91 any thoughts?
Comment #19
bucefal91 commented@clemens.tolboom, hey!
Ufff :) I've been on a tight schedule since May finishing a project, so I didn't really follow activities on issue queues of d.org. Hence my belated response.
Definitely take my code samples! I wrote that series exactly for that purpose - for the purpose of education and helping others. If somebody considers it useful enough to base views examples on it, that'd be just awesome! :)
I cannot promise I will do adapting myself in the nearest month or so because I am still not through with that project on my work, but if time allows me and nobody else has done, I'll be happy to de it myself too.
Comment #20
rcodinaPatch on #13 just helped me a lot. Thank you all!
Comment #21
jungle3.x-dev is the default branch right now.
Comment #22
clemens.tolboom@jungle can you please 'explain' why/how this version came into life. Preferably to a d.o CR link :)
Comment #23
jungle@clemens.tolboom, thanks for asking. FYI:
Copied and pasted from the project page, no CR.
Comment #24
clemens.tolboomThanks ... I checked with https://www.drupal.org/project/examples/releases
So more info is available @valthebald ;-)
I miss the link with #d9readiness effort as to move this issue forward we have to install 9.1.x first :-/
@jungle can you add 9.1-x testing? And publish this 3.x branch on the project page?
Comment #25
jungleSo instead of adding testing against 9.1.x, I did add testing with 9.0.x
Sorry, I have minimal maintainer privileges ATM, so unable to do it myself. But I will pass this message to @valthebald.
Thanks!
Comment #26
valthebaldMoving to new examples meta
Comment #27
avpaderno