|
2 | 2 | Layout |
3 | 3 | ====== |
4 | 4 |
|
| 5 | +.. version-added:: 2.0 |
| 6 | + |
| 7 | + Version 2.0 introduces a new, more flexible layout system and the ``sidebar_right`` |
| 8 | + and ``personaltools`` elements. |
| 9 | + |
| 10 | + There are new layout configuration settings available. See |
| 11 | + :ref:`layout_configuration` for details. |
| 12 | + |
5 | 13 | .. _layout_main_template: |
6 | 14 |
|
7 | 15 | Main Template |
@@ -36,6 +44,12 @@ is structured as follows. |
36 | 44 | .. figure:: ../../artwork/layout.svg |
37 | 45 | :width: 100% |
38 | 46 |
|
| 47 | + |
| 48 | +.. _layout_configuration: |
| 49 | + |
| 50 | +Layout Configuration |
| 51 | +-------------------- |
| 52 | + |
39 | 53 | The layout can be configured for each application node. Layout configuration |
40 | 54 | is described in ``cone.app.interfaces.ILayoutConfig`` and is registered for |
41 | 55 | one or more model classes with ``cone.app.layout_config`` decorator. |
@@ -67,35 +81,65 @@ one or more model classes with ``cone.app.layout_config`` decorator. |
67 | 81 | self.sidebar_left_min_width = 250 |
68 | 82 | self.sidebar_right_min_width = 250 |
69 | 83 |
|
70 | | -Provided layout settings: |
71 | | - |
72 | | -- **mainmenu**: Flag whether to display mainmenu. |
73 | | - |
74 | | -- **livesearch**: Flag whether to display livesearch. |
75 | | - |
76 | | -- **personaltools**: Flag whether to display personaltools. |
77 | | - |
78 | | -- **limit_content_width**: Flag whether content width should be limited on large screens. |
79 | | - |
80 | | -- **pathbar**: Flag whether to display pathbar. |
81 | | - |
82 | | -- **sidebar_left**: List of tiles by name which should be rendered in left sidebar. |
83 | | - |
84 | | -- **sidebar_left_min_width**: Minimum left sidebar width as integer (in px). |
85 | | - |
86 | | -- **sidebar_right**: List of tiles by name which should be rendered in right sidebar. |
87 | | - |
88 | | -- **sidebar_right_min_width**: Minimum right sidebar width as integer (in px). |
89 | | - |
90 | | -.. note:: |
91 | | - |
92 | | - As of version 2.0, ``limit_content_width`` defaults to ``False``. |
93 | | - |
94 | | -.. deprecated:: 2.0 |
95 | 84 |
|
96 | | - ``mainmenu_fluid`` and ``columns_fluid`` have been removed in ``cone.app 2.0``. |
97 | | - The ``columns_fluid`` setting has been replaced with |
98 | | - ``limit_content_width``. |
| 85 | +.. list-table:: Layout Configuration Settings |
| 86 | + :widths: 20 60 20 |
| 87 | + :header-rows: 1 |
| 88 | + |
| 89 | + * - Setting |
| 90 | + - Description |
| 91 | + - Default |
| 92 | + * - ``mainmenu`` |
| 93 | + - Flag whether to display mainmenu. |
| 94 | + - True |
| 95 | + * - ``livesearch`` |
| 96 | + - Flag whether to display livesearch. |
| 97 | + - True |
| 98 | + * - ``personaltools`` |
| 99 | + - Flag whether to display personaltools. |
| 100 | + - True |
| 101 | + * - ``limit_content_width`` |
| 102 | + - Flag whether content width should be limited on large screens. |
| 103 | + - True |
| 104 | + * - ``pathbar`` |
| 105 | + - Flag whether to display pathbar. |
| 106 | + - True |
| 107 | + * - ``sidebar_left`` |
| 108 | + - List of tiles by name which should be rendered in left sidebar. |
| 109 | + - ['navtree'] |
| 110 | + * - ``sidebar_left_mode`` |
| 111 | + - The mode of the left sidebar (``'stacked'`` or ``'toggle'``). |
| 112 | + - 'stacked' |
| 113 | + * - ``sidebar_left_min_width`` |
| 114 | + - Minimum left sidebar width as integer (in px). |
| 115 | + - 150 |
| 116 | + * - ``sidebar_right`` |
| 117 | + - List of tiles by name which should be rendered in right sidebar. |
| 118 | + - [] |
| 119 | + * - ``sidebar_right_mode`` |
| 120 | + - The mode of the right sidebar (``'stacked'`` or ``'toggle'``). |
| 121 | + - 'stacked' |
| 122 | + * - ``sidebar_right_min_width`` |
| 123 | + - Minimum right sidebar width as integer (in px). |
| 124 | + - 150 |
| 125 | + |
| 126 | +.. version-added:: 2.0 |
| 127 | + |
| 128 | + - The ``sidebar_left_min_width`` and ``sidebar_right_min_width`` settings have been |
| 129 | + added to specify minimum sidebar widths in px. |
| 130 | + - The ``sidebar_left_mode`` and ``sidebar_right_mode`` settings have been |
| 131 | + added to specify sidebar modes (either ``'stacked'`` or ``'toggle'``). |
| 132 | + - The ``limit_content_width`` setting has been added to replace the former |
| 133 | + ``columns_fluid`` setting. |
| 134 | + - As of version 2.0, ``limit_content_width`` defaults to ``False``. |
| 135 | + |
| 136 | +.. version-removed:: 2.0 |
| 137 | + |
| 138 | + ``mainmenu_fluid``, ``columns_fluid``, ``sidebar_left_grid_width`` and |
| 139 | + ``content_grid_width`` have been removed in ``cone.app 2.0`` in favor of a |
| 140 | + more flexible layout. |
| 141 | + Use the ``columns_fluid`` setting instead to limit content width on |
| 142 | + large screens. |
99 | 143 |
|
100 | 144 | .. deprecated:: 1.1 |
101 | 145 |
|
|
0 commit comments