Skip to content

Commit be4031e

Browse files
committed
up
1 parent 64ae238 commit be4031e

67 files changed

Lines changed: 596 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

en/03_Extras/DLMenu/index.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
## Основные параметры
2+
Для сортировки и ограничения выборки следует использовать параметры DocLister (sortBy, sortDir, orderBy, addWhereList и т.д.) По умолчанию выполняется сортировка по возрастанию значения поля menuindex, документы с hidemenu=1 не выводятся.
3+
4+
Параметр prepare нельзя задать для определенного уровня (например, prepare2). Но в самом prepare-сниппете узнать уровень можно из значения $data['level']. Параметр tvList также применяется ко всем уровням.
5+
6+
В параметрах шаблонов следует указывать уровень на 1 меньше (например, rowTpl2 будет применен к документам третьего уровня, а rowTpl0 - первого).
7+
8+
### parents
9+
Список id документов, от которых строится меню, через запятую. Если у указанных документов разные родители, то будет построено несколько меню. Чтобы вывести в том порядке, в котором перечислены родители, следует использовать параметр sortType1 со значением "doclist".
10+
11+
Возможные значения - список id через запятую.
12+
13+
Значение по умолчанию - id ресурса, в котором вызван сниппет.
14+
15+
### maxDepth
16+
Максимальное количество уровней в меню.
17+
18+
Возможные значения - число от 1.
19+
20+
Значение по умолчанию - 10.
21+
22+
### showParent
23+
Если значение параметра равно 1, то будут показаны документы, указанные в параметре parents.
24+
25+
Возможные значения - 0 или 1.
26+
27+
Значение по умолчанию - 0.
28+
29+
### api
30+
Если значение параметра равно 1, то результаты будут выведены в виде json-массива.
31+
32+
Возможные значения - 0 или 1.
33+
34+
Значение по умолчанию - 0.
35+
36+
### hideSubMenus
37+
Если значение параметра равно 1, то неактивные ветки меню не показываются.
38+
39+
Возможные значения - 0 или 1.
40+
41+
Значение по умолчанию - 0.
42+
43+
### openIds
44+
Результат аналогичен вызову с включенным параметром hideSubMenus, но можно указать через запятую id родительских документов, чьи непосредственные потомки будут всегда видны.
45+
46+
Возможные значения - список id через запятую.
47+
48+
Значение по умолчанию - не задано.
49+
50+
### countChildren
51+
Если значение параметра равно 1, то будет вычислено количество непосредственных дочерних документов для каждого ресурса в меню.
52+
53+
Возможные значения - 0 или 1.
54+
55+
Значение по умолчанию - 0.
56+
57+
### titleField
58+
Имя плейсхолдера, в котором задается название документа.
59+
60+
Значение по умолчанию - title.
61+
62+
### joinMenus
63+
Если задано несколько родителей и отключен параметр showParent, то сниппет выведет столько же меню. С помощью этого параметра их можно объединить в одно.
64+
65+
Возможные значения - 0 или 1.
66+
67+
Значение по умолчанию - 0.
68+
69+
## Шаблоны
70+
### outerTpl
71+
Обертка всего меню.
72+
73+
Возможные значения - имя шаблона, указанное по правилам задания шаблонов в DocLister.
74+
75+
Значение по умолчанию:
76+
```
77+
@CODE:<ul[+classes+]>[+wrap+]</ul>
78+
```
79+
80+
### rowTpl, rowHereTpl
81+
Шаблон для вывода пункта меню первого уровня без потомков. Для текущего документа может быть задан шаблон rowHereTpl.
82+
83+
Возможные значения - имя шаблона, указанное по правилам задания шаблонов в DocLister.
84+
85+
Значение по умолчанию:
86+
```
87+
@CODE:<li[+classes+]><a href="[+url+]">[+title+]</a></li>
88+
```
89+
90+
### parentRowTpl, parentRowHereTpl, parentRowActiveTpl
91+
Шаблон для вывода документа, у которого есть потомки. Для текущего документа может быть задан шаблон parentRowHereTpl, для активного - parentRowActiveTpl.
92+
93+
Возможные значения - имя шаблона, указанное по правилам задания шаблонов в DocLister.
94+
95+
Значение по умолчанию:
96+
```
97+
@CODE:<li[+classes+]><a href="[+url+]">[+title+]</a>[+wrap+]</li>
98+
```
99+
100+
### innerTpl
101+
Обертка блока дочерних документов.
102+
103+
Возможные значения - имя шаблона, указанное по правилам задания шаблонов в DocLister.
104+
105+
Значение по умолчанию - значение параметра outerTpl.
106+
107+
### innerRowTpl, innerRowHereTpl
108+
Шаблон для вывода дочернего документа. Для текущего документа может быть задан шаблон innerRowHereTpl.
109+
110+
Возможные значения - имя шаблона, указанное по правилам задания шаблонов в DocLister.
111+
112+
Значение по умолчанию - значение параметра rowTpl.
113+
114+
### categoryFolderTpl
115+
Шаблон для вывода категории (документа с полем isfolder=1 и шаблоном _blank или значением поля link_attributes содержащим слово category).
116+
117+
Возможные значения - имя шаблона, указанное по правилам задания шаблонов в DocLister.
118+
119+
Значение по умолчанию - значение параметра parentRowTpl.
120+
121+
## Классы
122+
Задаются для документов:
123+
* __rowClass__ - класс документа, задается значением параметра innerClass;
124+
* __firstClass__ - класс первого документа в группе, задается значением параметра firstClass (по умолчанию - first);
125+
* __lastClass__ - класс последнего документа в группе, задается значением параметра lastClass (по умолчанию - last);
126+
* __levelClass__ - класс уровня меню, задается значением параметра lastClass, к которому добавляется номер уровня (по умолчанию - level);
127+
* __webLinkClass__ - класс документа-ссылки, задается значением параметра webLinkClass;
128+
* __parentClass__ - класс документа-родителя, задается значением параметра parentClass;
129+
* __hereClass__ - класс текущего документа, задается значением параметра hereClass (по умолчанию - current);
130+
* __activeClass__ - класс активного документа, задается значением параметра activeClass (по умолчанию - active);
131+
* __oddClass__ - класс нечетного документа в группе, задается значением параметра oddClass (по умолчанию - odd);
132+
* __evenClass__ - класс четного документа в группе, задается значением параметра evenClass (по умолчанию - even);
133+
* __stateClass__ - задается значением плейсхолдера __[+state+]__.
134+
135+
Можно также добавить свои классы в prepare-сниппете:
136+
```
137+
$data['classes'] = array('myClass'=>'my');
138+
```
139+
140+
Задаются для оберток:
141+
* __innerClass__ - класс обертки дочерних документов, задается значением параметра innerClass;
142+
* __outerClass__ - класса обертки всего меню, задается значением параметра outerClass.
143+
144+
## Плейсходеры
145+
* __[+wrap+]__ - вывод дочерних документов (в api-режиме - children); если значение плейсхолдера - массив, то он преобразуется в строку с применением соответствующих шаблонов, если строка - остается без изменений;
146+
* __[+classNames+]__ - список классов, доступных в шаблоне (только имена);
147+
* __[+classes+]__ - список классов, доступных в шаблоне (включая class=" ");
148+
* __[+maxLevel+]__ - если установлен, то указывает на то, что документ находится в самом низу ветки, к которой принадлежит;
149+
* __[+iteration+]__ - порядковый номер документа в группе;
150+
* __[+here+]__ - если установлен, то документ является текущим документов;
151+
* __[+active+]__ - если установлен, то документ является активным документов;
152+
* __[+state+]__ - если задан параметр hideSubMenus, то плейсхолдер содержит значение open для развернутой ветви и closed для свернутой;
153+
* __[+title+]__ - название документа, равно полю menutitle, если оно не пустое, или pagetitle;
154+
* __[+url+]__ - ссылка на документ;
155+
* __[+count+]__ - количество непосредственных потомков;
156+
* __[+\_renderRowTpl+]__ - если установлен, то его значение будет использовано в качестве шаблона при выводе документов;
157+
* __[+\_renderOuterTpl+]__ - если установлен, то его значение будет использовано в качестве шаблона при выводе обертки дочерних документов.
158+
159+
Также доступны плейсхолдеры, устанавливаемые экстендером e, и плейсхолдеры отдельных классов: __[+oddClass+]__, __[+rowClass+]__ и т.д.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
2+
<p>Using Admin Roles, Document Groups, and Admin User Groups you can control every aspect of the management of your Evo site.</p>
3+
<h3 id="AdminRolesAndGroups-BeforeYouBegin">Before You Begin</h3>
4+
<p>Make sure that "Use access permissions" is set to Yes in the User Settings tab of System Configuration.</p>
5+
<p><img src="assets/images/docs/user-settings.jpg" alt=""></p>
6+
<h3 id="AdminRolesAndGroups-ThePieces">The Pieces</h3>
7+
<p>Permissions in Evo are composed of many parts that all work together. At first, it can be a little confusing as to what all the parts are, what they do, and how they interact. For that reason, each part will be explained below, followed by an example:</p>
8+
<ul>
9+
<li><strong>Document</strong> - The fundamental element (a "page") in Evo. Each document is assigned to one or more document groups.</li>
10+
<li><strong>Document group</strong>- As it sounds. A group of documents that for some reason are placed in the same group. A common example of this would be the main sections of a site (such as Products, Portfolio, or Services). A document group can be connected with one or more user groups.</li>
11+
<li><strong>User</strong>- The user piece contains information about the specific user such as name, password, etc. The user piece does NOT define the permissions. Permissions are defined in the role. Each user can be assigned to one or more user groups, but can only be assigned to one role.</li>
12+
<li><strong>Role</strong> - As just mentioned, the role is the piece that defines the permission of any user who is assigned that role.</li>
13+
<li><strong>User group</strong>- A collection of users who will need access to the same document groups. A user group can be connected to one or more document groups.</li>
14+
</ul>
15+
<p>So how do all these work together? Roles determine what a user has permission to do, and user groups combined with document groups determine what documents a user can work with. An example will probably the be most effective way to demonstrate this.</p>
16+
<p>Suppose you have a site to distribute the software your company writes. You also want to have a discussion and help forum. You decide that your site will look like this:</p>
17+
<ul>
18+
<li>Home</li>
19+
<li>News</li>
20+
<li>Products
21+
<ul>
22+
<li>Games</li>
23+
<li>Graphics Utilities</li>
24+
<li>Project Management</li>
25+
</ul>
26+
</li>
27+
<li>Support
28+
<ul>
29+
<li>FAQ</li>
30+
<li>Forums</li>
31+
<li>Contact Us</li>
32+
<li>Live Support Chat</li>
33+
</ul>
34+
</li>
35+
<li>About Us
36+
<ul>
37+
<li>Our history</li>
38+
<li>Our philosophy</li>
39+
<li>Our people</li>
40+
</ul>
41+
</li>
42+
</ul>
43+
<h3 id="AdminRolesAndGroups-Roles">Roles</h3>
44+
<p>First, you decide you will need these Roles:</p>
45+
<ul>
46+
<li><strong>Site administrators</strong> - will manage users and general site configuration.</li>
47+
<li><strong>Developers</strong> - will create the code used in special applications, such as the Live Support Chat feature. Will handle modules, plug-ins, snippets, and TVs</li>
48+
<li><strong>Designers</strong> - will be responsible for the overall look and layout of the site's pages. Will work with templates, chunks, and CSS.</li>
49+
<li><strong>Content editors</strong> - will be responsible for the content of the pages. Will work with documents.</li>
50+
<li><strong>Proofreaders</strong> - will be able to edit, but not create or delete documents.</li>
51+
</ul>
52+
<p><img src="assets/images/docs/role3.jpg" alt=""><br>
53+
<img src="assets/images/docs/role5.jpg" alt=""></p>
54+
<h3 id="AdminRolesAndGroups-DocumentGroups">Document Groups</h3>
55+
<p>Next, consider how the documents in your site will be grouped.</p>
56+
<ul>
57+
<li><strong>Corporate</strong> - pages referring to the company in general, such as the About Us pages and the Home page.</li>
58+
<li><strong>Product</strong> - pages dealing with individual products.</li>
59+
<li><strong>Support</strong> - pages that contain FAQ lists or company contact information.</li>
60+
</ul>
61+
<p><img src="assets/images/docs/access2.jpg" alt=""></p>
62+
<h3 id="AdminRolesAndGroups-UserGroups">User Groups</h3>
63+
<p>Then you begin to organize the User groups your content editor users will belong to.</p>
64+
<ul>
65+
<li><strong>Marketing</strong> - will handle Corporate pages; anything that will effect the public's perception of the company and its products.</li>
66+
<li><strong>Products</strong> - will work with the pages relevant to the company's products.</li>
67+
<li><strong>Support</strong> - will take care of the support pages.</li>
68+
<li><strong>Proofreaders</strong> - will have access to all documents (but is limited in what he can do with them by the permissions granted by his Role).</li>
69+
</ul>
70+
<p><img src="assets/images/docs/access1.jpg" alt=""></p>
71+
<p>Here is how the user groups and documents groups will interact.</p>
72+
<p><img src="assets/images/docs/usermap.png" alt=""></p>
73+
<h3 id="AdminRolesAndGroups-ImportantNote">Important Note</h3>
74+
<p>A user can belong to any number of User Groups, but he can be assigned to only one Role. For example, if you want one of the Proofreader users to also be a Support document editor, you will have to create a different User for him to log in as, and assign that user to the Support user group.</p>
75+
<p>Remember, Roles assign permissions - WHAT the user can do. User groups assign WHICH DOCUMENTS the user can work with, but he can only do what the role he was assigned to allows.</p>
76+
<h3 id="AdminRolesAndGroups-Usergroups>Documentgroups">User groups-&gt;Document groups</h3>
77+
<p>Now we need to connect the user groups to the document groups we want them to have access to. For example, the Proofreaders user groups will be connected to ALL of the document groups, since his job will be to correct errors in all documents. The Marketing user group should have access to the Corporate and the Support document groups. And of course the Product user group should be connected to the Product document group.</p>
78+
<p><img src="assets/images/docs/access3.jpg" alt=""></p>
79+
<p>Now, as documents are created, they need to be assigned to the proper Document groups. As users are created, they are assigned to a certain Role, then to their proper User Groups. Only users belonging to user groups connected to a given document's document group can have access to that document. Even if a user has access to a given document, he can only do with it what his individial Role assignment allows.</p>
80+
<p>In this way, the Roles, User and Document Groups system allows a fine-grained control of individual document and admin user interaction.</p>

0 commit comments

Comments
 (0)