Skip to content

Commit a657d3f

Browse files
Merge pull request #714 from Timo-Breumelhof/feature/713-TEXT-SKO
Tut. > Theme Objects > Add TEXT and move ControlPanel #713
2 parents 78bc15c + 3b637f9 commit a657d3f

File tree

4 files changed

+118
-3
lines changed

4 files changed

+118
-3
lines changed

content/tutorials/themes/theme-objects/ddrmenu/ddrmenu-xslt-templates/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locale: en
44
title: DDRMenu XSLT Templates Overview
55
dnnversion: 09.02.00
66
previous-topic: ddrmenu-token-templates
7-
next-topic: designers-home
7+
next-topic: text
88
related-topics: theme-objects,themes,create-theme
99
links: ["[DNN Wiki: DotNetNuke Skins](https://www.dnnsoftware.com/wiki/dotnetnuke-skins)","[DNN Community blog: DotNetNuke Skinning 101 (Part 3) by Joe Brinkman](https://www.dnnsoftware.com/community-blog/cid/131995/dotnetnuke-skinning-101-part-3)","[DNN Professional Training: Creating HTML Skins](https://www.dnnsoftware.com/services/professional-training/training-videos-subscription/skinning-2-creating-html-skins)","[Skinning Tool / Online Reference for DNN Skins & Container Objects by 10 Pound Gorilla](https://www.10poundgorilla.com)"]
1010
---

content/tutorials/themes/theme-objects/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ The <dnn:BREADCRUMB...> block should be placed in the Theme on the spot you want
121121
|[BREADCRUMB](xref:breadcrumb)|Displays the path to the current tab (`>` is the default separator). Example: `PageName1 > PageName2 > PageName3`|
122122
|[CSSINCLUDE](xref:cssinclude)|Load Custom Stylesheet for your Theme|
123123
|[CSSEXCLUDE](xref:cssexclude)|Prevents a stylesheet reference from being included in the page.|
124-
|CONTROLPANEL|Displays the DNN control panel. If the **CONTROLPANEL** theme object is not used in the theme, then DNN inserts a control panel control at the top of the page.|
125124
|[COPYRIGHT](xref:copyright)|Displays the copyright notice for the website.|
126125
|[CURRENTDATE](xref:currentdate)|Displays the current date on the server.|
127126
|[DDRMENU](xref:ddrmenu-overview)|Displays a menu using the **DDRMenu** control.|
@@ -143,7 +142,7 @@ The <dnn:BREADCRUMB...> block should be placed in the Theme on the spot you want
143142
|SIGNIN|Displays the login control.|
144143
|TAGS|Displays the **Tag** control allowing users to view and edit tags associated with the page or module.|
145144
|TERMS|Displays a link to the Terms and Conditions page of the website.|
146-
|TEXT|Displays localized text in your theme and supports the use of token replacement.|
145+
|[TEXT](xref:text)|Displays localized text in your theme and supports the use of token replacement.|
147146
|TOAST|Adds the toast notification control to the page. Toast messages will be shown when a new user notification or message is received.|
148147
|USER|Displays a **Register** link for anonymous users or the user's name for authenticated users.|
149148
|USERANDLOGIN|Displays a **Register** / **login** / **User** block.|
@@ -157,6 +156,7 @@ The <dnn:BREADCRUMB...> block should be placed in the Theme on the spot you want
157156

158157
|**Legacy Theme Object**|**Description**|**Replaced by**|
159158
|---|---|---|
159+
|CONTROLPANEL|**Obsolete in DNN 9+.** Displays the DNN control panel. If the CONTROLPANEL theme object is not used in the theme, then DNN inserts a control panel control at the top of the page.|
160160
|LEFTMENU|Displays a vertical menu layout.|DDR Menu with the appropriate template|
161161
|LINKS|Displays a flat menu of links associated with the current tab level and the parent node.|DDR Menu with the appropriate template|
162162
|NAV|Displays a menu according to the type specified in the ProviderName attribute.|DDR Menu with the appropriate template|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
uid: text
3+
locale: en
4+
title: TEXT Theme object
5+
dnnversion: 09.02.00
6+
previous-topic: ddrmenu
7+
next-topic: theme-objects
8+
related-topics: theme-objects,themes,create-theme
9+
links:
10+
---
11+
12+
# TEXT Theme Object Introduction
13+
14+
Displays Localized text in your theme / skin, also supports the use of DNN Core Token replacement.
15+
16+
The text will be loaded from a resource file (*.resx), you need a separate resx file per language.
17+
18+
These should be located in a folder named "App_LocalResources" (in the Theme folder).
19+
20+
21+
22+
## Naming convention:
23+
24+
When your skin file = index.ascx:
25+
Default language: index.ascx.resx
26+
French: index.ascx.fr-FR.resx
27+
German: index.ascx.de-DE.resx
28+
29+
30+
31+
## Resource file content:
32+
33+
~~~
34+
<?xml version="1.0" encoding="utf-8"?>
35+
<root>
36+
<data name="Welcome.Text">
37+
<value>Welcome</value>
38+
</data>
39+
</root>
40+
~~~
41+
42+
43+
**Current Version:** 01.00.00
44+
45+
46+
## Include in Theme
47+
48+
### ASCX
49+
``` html
50+
<%@ Register TagPrefix="dnn" TagName="TEXT" Src="~/Admin/Skins/Text.ascx" %>
51+
<dnn:TEXT runat="server" id="dnnTEXT-Welcome" ShowText="Welcome, " ResourceKey="Welcome.Text" ReplaceTokens="False" />
52+
```
53+
54+
### HTML Token
55+
[TEXT]
56+
57+
### HTML Object Token
58+
``` html
59+
<object id="dnnTEXT" codetype="dotnetnuke/server" codebase="TEXT"></object>
60+
```
61+
62+
| Attribute | Description | Default | Posssible Values | DNN Version |
63+
| --- | --- | --- | --- | --- |
64+
| ShowText | The text to display if there is no text<br/>available from a resource file. | | | 01.00.00 |
65+
| CssClass | This value is the name of a CSS class that will be added to the rendered HTML.<br/>(the text will be rendered inside a span) | Normal | | 01.00.00 |
66+
| ResourceKey | The name of XML element's content in the resource file (*.resx) to be used. | | Hello.Text | 01.00.00 |
67+
| ReplaceTokens | This true/false value will tell DNN to look for system tokens and replace them with the appropriate text | False | True<br/>False | 01.00.00 |
68+
69+
## Tokens
70+
> [!NOTE]
71+
>
72+
73+
Below is only a small selection of the tokens that can be useful, but you can use all of the supported Core Tokens
74+
75+
76+
77+
78+
| Name | Value | Description |
79+
| --- | --- | --- |
80+
| User Display name | [User:displayname] | The display name of the current user |
81+
| User First Name | [User:firstname] | The first name of the current user |
82+
| User Lastname | [User:lastname] | The last name of the current user |
83+
| Portal Name | [Portal:portalname] | The name of the current Portal |
84+
85+
86+
87+
88+
## Examples:
89+
90+
### Text Theme Object Fallback text
91+
Show Fallback text as the Resourcekey is not found
92+
93+
~~~html
94+
<dnn:TEXT runat="server" id="dnnTEXT-fallback" ShowText="Fallback" CssClass="dnn-text" ResourceKey="Main.Text" ReplaceTokens="False" />
95+
96+
97+
~~~
98+
99+
100+
### Text Theme Object EN, FR, NL text
101+
Example for English, French and Dutch
102+
103+
~~~html
104+
<dnn:TEXT runat="server" id="dnnTEXT-Demo" ShowText="Demo" CssClass="dnn-text" ResourceKey="Example.Text" ReplaceTokens="False" />
105+
~~~
106+
107+
108+
### Text Skin Object Tokens
109+
Use Tokens for a personalized message
110+
111+
~~~html
112+
<dnn:TEXT runat="server" id="dnnTEXT-Tokens" ShowText="Tokens" CssClass="dnn-text" ResourceKey="Token.Text" ReplaceTokens="True" />
113+
~~~
114+

content/tutorials/toc.md

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
####[Razor Templates Overview](xref:ddrmenu-razor-templates-overview)
244244
####[Token Templates](xref:ddrmenu-token-templates)
245245
####[XSLT Templates](xref:ddrmenu-xslt-templates)
246+
###[TEXT](xref:text)
246247
##[Persona Bar Style Guide](xref:persona-bar-style-guide)
247248

248249
#[JWT](xref:jwt)

0 commit comments

Comments
 (0)