Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached is a full module, for review, that does two things:
1) Allows preview of Nodes per type in StyleGuide,
2) Auto-generates nodes for preview. These auto-generated nodes are unpublished, and should generate some random CCK and node data.
Needs testing and (better) field handling. The method might also be of use to devel_generate, but I don't want to introduce the dependency during development.
Written for D6, should be portable to D7.
Comment | File | Size | Author |
---|---|---|---|
styleguide_node.zip | 3.7 KB | agentrickard |
Comments
Comment #1
agentrickardThese lines (93-95) should really be commented out for real testing:
Comment #2
Dublin Drupaller CreditAttribution: Dublin Drupaller commentedthis is very useful. it's generating sample nodes, where nodes don't exist but not quite generating the cck fields attached to node types as well.
furthermore...it appears to be generating a full node...rather a mix between teaser and full node. in other words, when I generate a sample event node, for example, it outputs a linked h2 title rather than a regaular h2 node title.
will try and find some time to help improve this module...and add-on...it could be a superb tool for testing or doing quality control on a theme.
dub
Comment #3
squiggy CreditAttribution: squiggy commentedThis looks great. It would be super useful to be able to preview all node types on a site. I had done something similar, except if there was no node created for a content type, it provided a link to create it.
@Dublin Drupaller, Did you ever figure out the issue with the title being linked in full node view?
Comment #4
malcomio CreditAttribution: malcomio commentedI've started a sandbox project for 7.x here: https://drupal.org/sandbox/malcomio/2055771
It depends on devel_generate to get dummy content without cluttering up the database with nodes.
Still in very early stages, though...
Comment #5
malcomio CreditAttribution: malcomio commented