Skip to main content

DjangoCMS plugin for embedding menus in placeholders

Project description

## DjangoCMS Embedded Menu

This simple extension allows you to place menus in placeholders via the
administration interface.


## Requirements

* django-cms
* And all the requirements the above project(s) depend on.


## Installation

1. make sure you are using a python virtual environment

virtualenv ~/Dev/virtualenv/projectname;
. ~/Dev/virtualenv/projectname/bin/activate;
cd ~/Dev/projects/projectname/;

2. install it from pypi

`pip install cmsplugin-embedded-menu`

3. or, install it from github

`pip install git+https://github.com/airtonix/cmsplugin-embedded-menu`

## Configuration

1. add `cmsplugin_embeddedmenu` to your `INSTALLED_APPS`

2. perform a `./manage.py migrate` (for south users), or `./manage.py syncdb`

3. There is no step three!


## Override Template

Choosing a template in the administration interface means that you
populate the following two relative paths (to any of your app template dirs)
with templates you desire to be made available.

* cmsplugin_embeddedmenu/layouts

Any .html file that doesn't contain the word 'base' will be presented in
the template selector combo dropdown in the admin interface.

For example, if your django project was at :

`~/Dev/Django/MyProjectName/`

And you had a django application named `SomethingSomethingSomething` at :

`~/Dev/Django/MyProjectName/SomethingSomethingSomething/`

Then templates for this plugin could be found at :

`~/Dev/Django/MyProjectName/SomethingSomethingSomething/templates/cmsplugin_embeddedmenu/layouts/*.html`

In fact, anywhere django looks for templates, you can place the following tree :

```
/cmsplugin_embeddedmenu
/layouts
/*.html
```

### Customising Templates

Templates in all groups are provided the context :

a CMSPlugin has many useful attributes for you to use, the main one
is `plugin.instance` a reference to the settings model.

> plugin' :
> An instance of CMSPlugin, which itself provides reference to either
> of the settings models as outlined below.

#### base.html

base.html in the `cmsplugin_configurableproduct` directory is used to load the
selected template chosen in the administration interface.


#### ./layouts/*.html

templates here are provided the context :

> plugin.instance
> template
> Chosen template.
>



## Contributions

anyone is free to contribute, simply submit a merge request at
github : http://github.com/airtonix/cmsplugin-configurableproduct


## Todo

provide option to manipulate menu choices:

* Refine the product filter.
* Provide better default templates.
* Allow selecting/use of snippets for menu templates?

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

cmsplugin-embedded-menu-0.0.5.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file cmsplugin-embedded-menu-0.0.5.tar.gz.

File metadata

File hashes

Hashes for cmsplugin-embedded-menu-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d60433196626f850a9b63d7f8d21dd604ace92078df1a223798efff7fc231fb5
MD5 b7ed43dcbd06e1f3faef5394b9ef8cf5
BLAKE2b-256 ac3e0fd47a6b6e752fb81762a7ea5c50cde69097d39bedfec4a8ea0bd51b5909

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