Simpleviews CCK Field

KarenS - July 26, 2009 - 22:25
Project:SimpleViews
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I have created a CCK field to embed a simpleviews widget into a node. The field then presents the Simpleviews widget to the node author to choose the view settings and displays the results in the node. You can add more than one simpleviews field to a content type if you like and have them filtering out different things.

I had to work out a system to rewrite the path for summary view links so that it would work in nodes, especially when using pathauto. I did that by passing the argument back as a query string in the url.

With this module and the two other patches I just posted, I can put two different simpleviews fields on a content type, set one up to use an argument and the other not and pass the argument so that only the view that needs it uses it. Multiple pagers on the same page should also be working correctly.

The Simpleviews overview form shows you the views created this way but won't let you edit or delete them directly, it links back to the node edit form instead.

This creates a nice, super simple, way for end users to create listing pages without any access to the admin section of the site. You could turn on Content Permissions to restrict access to the Simpleviews field.

Here it is if you're interested, I wasn't sure if you wanted to make this a part of the Simpleviews module or if you want me to create a separate project for it.

#1

KarenS - July 26, 2009 - 22:26

Forgot the file :)

AttachmentSize
simpleviewsfield.zip 5.2 KB

#2

KarenS - July 26, 2009 - 22:35

Oops, left some outdated stuff in that file, this is better.

AttachmentSize
simpleviewsfield.zip 5.04 KB

#3

KarenS - November 2, 2009 - 18:47

Updated, latest, greatest version.

AttachmentSize
simpleviewsfield.zip 12.51 KB

#4

KarenS - November 2, 2009 - 18:48

I'm hoping that we can add #531544: Add summary views for arguments, the simpleviewsfield module assumes that is there. Probably won't break without it, but it is more useful if it gets in.

 
 

Drupal is a registered trademark of Dries Buytaert.