Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 109 lines (60 sloc) 2.656 kB
f646d2c initial import
Zenobius Jiricek authored
1 ## DjangoCMS Embedded Menu
2
3 This simple extension allows you to place menus in placeholders via the
4 administration interface.
5
6
7 ## Requirements
8
9 * django-cms
10 * And all the requirements the above project(s) depend on.
11
12
13 ## Installation
14
15 1. make sure you are using a python virtual environment
16
17 virtualenv ~/Dev/virtualenv/projectname
18 . ~/Dev/virtualenv/projectname/bin/activate
19 cd ~/Dev/projects/projectname/
20
21 2. install it from pypi
22
23 pip install cmsplugin-embedded-menu
24
25 3. or, install it from github
26
27 pip install git+https://github.com/airtonix/cmsplugin-embedded-menu
28
29 ## Configuration
30
31 1. add `cmsplugin_embeddedmenu` to your `INSTALLED_APPS`
32
33 2. perform a `./manage.py migrate` (for south users), or `./manage.py syncdb`
34
35 3. There is no step three!
36
37
38 ## Override Template
39
40 Choosing a template in the administration interface means that you
41 populate the following two relative paths (to any of your app template dirs)
42 with templates you desire to be made available.
43
44 * cmsplugin_embeddedmenu/layouts
45
46 Any .html file that doesn't contain the word 'base' will be presented in
47 the template selector combo dropdown in the admin interface.
48
49 For example, if your django project was at :
50
51 ~/Dev/Django/MyProjectName/
52
53 And you had a django application named `SomethingSomethingSomething` at :
54
55 ~/Dev/Django/MyProjectName/SomethingSomethingSomething/
56
57 Then templates for this plugin could be found at :
58
59 ~/Dev/Django/MyProjectName/SomethingSomethingSomething/templates/cmsplugin_embeddedmenu/layouts/*.html
60
61 In fact, anywhere django looks for templates, you can place the following tree :
62
63 /cmsplugin_embeddedmenu
64 /layouts
65 /*.html
66
67
68 ### Customising Templates
69
70 Templates in all groups are provided the context :
71
72 a CMSPlugin has many useful attributes for you to use, the main one
73 is `plugin.instance` a reference to the settings model.
74
75 > plugin' :
76 > An instance of CMSPlugin, which itself provides reference to either
77 > of the settings models as outlined below.
78
79 #### base.html
80
81 base.html in the `cmsplugin_configurableproduct` directory is used to load the
82 selected template chosen in the administration interface.
83
84
85 #### ./layouts/*.html
86
87 templates here are provided the context :
88
89 > plugin.instance
90 > template
91 > Chosen template.
92 >
93
94
95
96 ## Contributions
97
98 anyone is free to contribute, simply submit a merge request at
99 github : http://github.com/airtonix/cmsplugin-configurableproduct
100
101
102 ## Todo
103
104 provide option to manipulate menu choices:
105
106 * Refine the product filter.
107 * Provide better default templates.
108 * Allow selecting/use of snippets for menu templates?
Something went wrong with that request. Please try again.