Skip to main content

A viewlet displaying links to subdocuments and quickly loading their content via jquery

Project description

Overview

This is a simple add-on that provides a tabbed-style display for the content of documents. You only need to add class “linkcollection” to a h2 heading. This heading will be turned into the title of the tab, and the following content, until the next such heading or the end of the page, will become the tab content. There can only be one tab open at a time - clicking on one tab closes the others.

At the bottom of each tab’s content, an anchor link to the top is inserted. Clicking on it will cause a smooth scroll to the top.

WYSIWYG editor integration

You can add a style to the editor of your choice, so that a heading can be added to a link collection without the need for manually adding a class.

For TinyMCE, go to portal_tinymce/@@tinymce-controlpanel and add the following line under Styles:

Linkcollection|h2|linkcollection

For CKEditor, go to @@ckeditor-controlpanel and add the following line under Menu Styles, in the section Block Styles:

{ name : 'Linkcollection', element: 'h2', attributes: {'class': 'linkcollection' } },

Legacy implementation

The first version of the link collection worked by selecting references to documents to be displayed. Hence the name “link collection”. The tabbed collection itself was displayed in a viewlet. The code for this version is still present, but not recommended to use for SEO reasons (content duplication is considered bad).

Credits

Copyright European Agency for Health and Safety at Work and Syslab.com GmbH.

slc.linkcollection development was funded by the European Agency for Health and Safety at Work.

License

slc.linkcollection is licensed under the GNU Lesser Generic Public License, version 2 or later and EUPL version 1.1 only. The complete license texts can be found in docs/LICENSE.GPL and docs/LICENSE.EUPL.

slc.linkcollection Changelog

1.4.2 (2013-12-18)

  • Replace jQuery with jq to avoid conflicts [deroiste]

1.4.1 (2012-09-17)

  • Plone 4

1.4.0 (2011-11-29)

  • Minor changes for Plone4 compatibility [thomasw]

1.3.7 (2011-05-19)

  • Added “slow” scrolling to anchors for jQuery based version [thomasw]

1.3.6 (2011-05-18)

  • New jquery-ui based link collection: simply assign class “linkcollection” to a number of h2 tags. SEO improvement, refs #2830 [thomasw]

1.3.5 (2011-01-24)

  • Added new styles to linkbox, provided by cornae. Reference: Syslab #1152 [cornae, thomasw]

  • Added anchor and corresponding “Go up” link. Reference: Syslab #1152 [thomasw]

1.3.4 (2010-11-23)

  • deactivated setting the div’s height to maxheight #253 [thomasw]

1.3.3 (2010-10-21)

  • set a class denoting the currently selected item also on the <li>, not only on the <a> tag [thomasw]

1.3.2 (2009-09-30)

  • Nothing changed yet.

1.3.1 (2009-09-30)

  • Bug fix: the parent folder could be selected as a link even though it isn’t a document

  • Feature: scroll to the top of the linkbox when a document is displayed without causing the page to jump up and down for longer and shorter documents.

1.3.0 (2009-09-29)

  • linkcollection can now also be used on ATFolders. For the Annotations-factory, I had to use a somewhat awkward naming & inheritance construct, so as not to break existing linkcollection instances.

  • added a BrowserView (linkcollection-view) for displaying contents of a Linkcollection

  • enhanced search mechanism to distinguish between folder and document (thomasw)

slc.linkcollection 1.2.3 (2009-07-20)

  • added an id to the linkcollection prefetched docs so that they can be fetched by the linkscanner (pilz)

slc.linkcollection 1.2.2 (2009-07-06)

  • small fix for a bug with empty append

slc.linkcollection 1.2.1 (2009-07-03)

  • Fixed problem where LC references a non existing doc but still appends it to the list (pilz)

slc.linkcollection 1.2 (2009-06-19)

  • test fixes (gerken)

slc.linkcollection 1.1 (2009-05-12)

  • Packaged egg (pilz)

slc.linkcollection 1.0 (2008-03-31)

  • Initial port

Contributors

  • Alexander Pilz (Syslab.com GmbH)

  • Cillian de Roiste (Syslab.com GmbH)

  • Jan Carel Brand (Syslab.com GmbH)

  • Patrick Gerken (Syslab.com GmbH)

  • Wolfgang Thomas (Syslab.com GmbH)

  • Cornelis Kolbach (Cornae.org)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slc.linkcollection-1.4.2.zip (32.5 kB view details)

Uploaded Source

File details

Details for the file slc.linkcollection-1.4.2.zip.

File metadata

File hashes

Hashes for slc.linkcollection-1.4.2.zip
Algorithm Hash digest
SHA256 d1131c839fa58cae13b12c02e5240371380dba67037708ceed59f64057416ab3
MD5 8c8db6aaa84b8e2ac4f0f2f11c78474e
BLAKE2b-256 9197fe2d2e0b68cea36999f2985ead4646eee2a36acd88cb91ceafc24ce70c97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page