You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/layout/popover/templates.md
+97-63Lines changed: 97 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,89 +12,123 @@ The PopOver allows you to control the way its header and body sections are rende
12
12
13
13
## Header Template
14
14
15
-
To specify the layout of the header that will be displayed, use the `Header` method.
15
+
To specify the layout of the header that will be displayed, use either the [`Header()`](/api/kendo.mvc.ui.fluent/popoverbuilder#headersystemstring) option, which accepts a string, or the [`HeaderHandler()`](/api/kendo.mvc.ui.fluent/popoverbuilder#headerhandlersystemstring) option, which returns the template content through a JavaScript function.
16
+
17
+
The following example demonstrates how to use the `HeaderHandler()` option to set the header of the PopOver based on the text content of the target element.
You can configure the body section through the `Body` method.
67
+
You can configure the body section through the [`Body()`](/api/kendo.mvc.ui.fluent/popoverbuilder#bodysystemstring) or [`BodyHandler()`](/api/kendo.mvc.ui.fluent/popoverbuilder#bodyhandlersystemstring) configuration options.
68
+
69
+
When using the `Body()` option, you can specify the content directly as a string or use the [Template component]({% slug htmlhelpers_overview_template%}) to integrate other UI components or HTML elements.
70
+
71
+
If the PopOver body content must be dynamic (for example, based on a specified condition or other components and elements on the page), utilize the `BodyHandler()` method that accepts the name of a JavaScript function.
72
+
73
+
The following example shows how to use the `BodyHandler()` option to display an image and description in the body of the PopOver by using HTML attributes of the target element.
42
74
43
75
```HtmlHelper
44
-
<ul id="products">
45
-
<li>
46
-
<a href="#" data-id="11" title="A cheese made in the artisan tradition by rural dairy farmers in the north of Spain">
47
-
Queso de Cabrales
48
-
</a>
49
-
</li>
50
-
<li>
51
-
<a href="#" data-id="12" title="A cheese made in the La Mancha region of Spain from the milk of sheep of the Manchega breed">
0 commit comments