Source

cmsplugin-faq /

The cms-2.X branch has multiple heads

Filename Size Date modified Message
cmsplugin_faq
examples
148 B
561 B
43 B
94 B
1.7 KB
171.7 KB
956 B

BETA

Name: cmsplugin-faq Description: duplicate of django-cms2's Text plugin: adds a 'topic' field and link anchors in templates; CMSFaqEntryPlugin creates FAQ entries (questions & answers); CMSFaqListPlugin creates <a> anchor list of FAQ entries, on the same page; CMSFaqEntryLinkPlugin links to specific or random CMSFaqEntries Download: http://bitbucket.org/tehfink/cmsplugin-faq/

Requirements: - django-cms-2 = 2.0.2 - django = 1.1.1

Setup - this release is only compatible with django-cms 2.0.2 - make sure requirements are installed and properly working - add cmsplugin_faq to python path - add 'cmsplugin_faq' to INSTALLED_APPS - run 'python manage.py syncdb' - add plugins to pages

Optional - define CMSPLUGIN_FAQLIST_CSS_CHOICES in settings - copy cmsplugin_faq/templates/plugins/cmsplugin_faq/ to your project directory

Todo: - allow CMSFaqListPlugin plugin to be on a different page than CMSFaqEntryPlugin - test with TinyMCE (should work) - subclass Text plugin when this is possible

NB: - if you have CMS_MODERATOR enabled, you will see an issue where the FaqEntryLinkPlugin lists FaqEntries twice; the second listing is apparently an empty item. see: http://groups.google.com/group/django-cms/browse_thread/thread/3bc43ed4eb7c5467/2c4af3741bdbaa2d?lnk=gst&q=cms_moderator#2c4af3741bdbaa2d

Examples:

in settings.py: CMSPLUGIN_FAQENTRY_CSS_CHOICES = (('1', 'featured'),) - adds an optional css class to the faq entry in the plugin template

in a template: {% get_latest_faqs 3 as latest_faqs %} {% for latest in latest_faqs %} ... {% endfor %} - returns latest Faq plugins descendant from the current page

Note: This is not great code, but it works. Please tell me how to make it better!

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.