Skip to main content

Wrap any Plone portlet with geolocation or language negotiation.

Project description

The geoportlet works as a wrapper around the exiting portlet types.

Usage

When you select the “Geoportlet” type under “Manage portlets”, the add form lets you select from a database of countries and languages, and choose a portlet type. In the next screen, you’ll create the chosen portlet (if it requires user input).

The geoportlet toggles its availability based on IP address lookup and/or HTTP language accept strings. You can use it to segment the audience for a portlet into particular countries or language groups, e.g. China and Mandarin.

It uses the geolocation database provided by http://Software77.net.

Compatibility: Plone 4+.

HTML

Each geoportlet wraps the contained portlet assignment in an HTML <div> element with CSS-classes corresponding to the selected countries and/or languages. The format is geoportlet-<country> and geoportlet-<language> where the country is provided as the three-letter ISO 3166-1 alpha-3 country code and the language is provided as the two-letter ISO 639-1 language code:

<div class="geoportlet-dnk geoportlet-da">
   <div class="portlet ...">
      ...
   </div>
</div>

Author

Malthe Borch <mborch@gmail.com>

Changelog

1.0 (2012-06-06)

  • Initial public release.

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

collective.portlet.geo-1.0.tar.gz (1.4 MB view details)

Uploaded Source

File details

Details for the file collective.portlet.geo-1.0.tar.gz.

File metadata

File hashes

Hashes for collective.portlet.geo-1.0.tar.gz
Algorithm Hash digest
SHA256 70f4a08c8ea67e53d2ace8c17feae6025c8eef3f5dd45d9853430e36c34360ab
MD5 9ca6b65cf7ab75115a125a0c2540f844
BLAKE2b-256 7b2e90067bdf718261acdc027ed88c488a43d0852891b999b99b24a1bff8360b

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