Skip to content

Commit d738a7a

Browse files
authored
Merge pull request #872 from nep/patch-13
Update single-variables.md
2 parents fcb8822 + 34e350d commit d738a7a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/templates/globals/single-variables.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ This variable will be substituted for the global character set (UTF-8). It is ty
3333

3434
### `{cp_session_id}`
3535

36-
The session id for the control panel. This is the value needed in the "S=" portion of the control panel URL. Only output for logged-in members who have access to the Control Panel, for instance to build a front-end URL to an add-on in the control panel:
36+
The active session id for the control panel. This is the value needed in the "S=" portion of the control panel URL. Only made available for logged-in members who have access to the Control Panel. Used to build a URL from the front-end to, for instance, an add-on in the control panel.
3737

38-
{if logged_in_role_id == 1}
39-
&bull; <a href="{cp_url}?/cp/addons/settings/my_addon&S={cp_session_id}"></a>
38+
{if logged_in_primary_role_id == 1}
39+
&bull; <a href="{cp_url}?/cp/addons/settings/my_addon{if cp_session_id}&S={cp_session_id}{/if}">CP Link</a>
4040
{/if}
4141

42+
NOTE: **Note:** To check non-primary roles, use [exp:member:has_role](/member/member-roles-tags.html#expmemberhas_role)
43+
4244
### `{cp_url}`
4345

4446
The URL to the control panel for this site. Only output for logged-in members who have access to the Control Panel.
@@ -313,6 +315,8 @@ The Member ID for the currently logged-in user.
313315

314316
The Primary Role ID number for the currently logged-in user.
315317

318+
NOTE: **Note:** To check and display non-primary roles, use [exp:member:has_role](/member/member-roles-tags.html#expmemberhas_role)
319+
316320
### `{logged_in_primary_role_name}`
317321

318322
The title of the Primary Role for the currently logged-in user.

0 commit comments

Comments
 (0)