This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
mezzanine-pageimages
====================

Define (background-/banner-)images per page

# The Problem

At least our designer likes to create websites where pages can have individual backgrounds. Or individual banners. So for example the index-page has a generic background, while all pages under _Contact_ should have another background.

Mezzanine has this great feature that templates are searched by
`page-name.html`, `<content_type>.html` and then `page.html`. so one
would just create specific templates for the pages that get different
background. Its a nice solution that even works. But it has drawbacks:
- To change the background, the designer has to ask the programmer because it
can't be changed in the admin-backend.
- When you have multiple child-pages which should all get the background of
the parent-page, you end up with templates for each page.
- When the designer or writer adds another page, the programmer has to add
another template.

Mostly the problem is mixing content with design-code.

# The Solution

Here is how mezzanine-pageimages solves this:
- In the admin-backend we just add a way to define images for certain roles
and specific to certain pages. Plus a way to define default-images for the
roles.
- We define a template-tag `pageimage` that takes a role and the looks for
the fitting image for the current page.
- When there is no image for that role for the current page, it looks for an
image on the parent page. It goes upwards until there is no parent or an
image is found.
- When there is still no image found, the default image for that role is
returned, if there is one defined.

# Install

This package is on pypi.python.org. To simply install it just do `pip install mezzanine-pageimage`. Or define it as a requirement in your _requirements.txt_ or _setup.py_.

For hacking on mezzanine-pageimages do a git-checkout and install via `pip install -e`. Or install by `pip install -e git+https://github.com/bcs-de/mezzanine-pageimages.git#egg=mezzanine-pageimages`.

# Usage

Add the app to your `INSTALLED_APPS`. You can define your own image-roles in the `SETTINGS` in settings.py:

```python
PAGEIMAGE_TYPES = (
('BACKGROUND', 'Description text'),
)
```

Then use it in your templates:

```
{% load pageimage_tags %}

Lets get the url for the background image: {% pageimage 'BACKGROUND' %}
```
Release History

Release History

0.2.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mezzanine-pageimages-0.2.3.tar.gz (9.3 kB) Copy SHA256 Checksum SHA256 Source Feb 21, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting