|
23 | 23 | Use emphemeral fields |
24 | 24 | </li> |
25 | 25 | <li> |
26 | | - Use data.parameters in your formulas |
| 26 | + Use <code>data.parameters</code> in your formulas <em>new in v14</em> |
27 | 27 | </li> |
28 | 28 | </ul> |
29 | 29 | <br> |
|
49 | 49 | <p>Learn more about Ephemeral fields <a href="https://docs.2sxc.org/basics/data/fields/ephemeral.html">here</a>.</p> |
50 | 50 |
|
51 | 51 |
|
52 | | -<h3>Ephemeral field <snippet id="formulas-ephemeral"> |
| 52 | +<h3>Ephemeral field |
| 53 | + <snippet id="formulas-ephemeral"> |
53 | 54 | @Edit.Toolbar(toolbar: new[] { "toolbar=empty", "+new&icon=" + tbHlp.Icon() + "?contentType=FormulasEphemeral"}) |
| 55 | + @Edit.Toolbar(toolbar: new[] { "toolbar=empty", "+new&icon=" + tbHlp.Icon() + "?contentType=FormulasEphemeral&prefill:VarShowAdvanced=true"}) |
54 | 56 | </snippet> |
55 | 57 | </h3> |
56 | 58 | <p> |
57 | | - VarShowAdvanced is an ephemeral field and thus not saved in the database. This formula determines the visibility of |
58 | | - the Advanced Settings group. The group becomes visible, when the VarShowAdvanced toggle is active. |
| 59 | + <code>VarShowAdvanced</code> is an ephemeral field and thus not saved in the database. |
| 60 | + This formula determines the visibility of the Advanced Settings group. |
| 61 | + The group becomes visible, when the VarShowAdvanced toggle is active. |
59 | 62 | <br> |
60 | | - <em>Click on the (+) button above to see the edit-UI with the formula. </em> |
| 63 | + <em>Click on the (Σ) button above to see the edit-UI with the formula. </em> |
61 | 64 | </p> |
62 | 65 |
|
63 | 66 | <code id="formulas-ephemeral-label"></code> |
64 | 67 | <hide-silent> @* Show only this snippet *@ |
65 | | - @Html.Partial("../shared/_source-code.cshtml", new { Path, Snippet = "formulas-ephemeral", Size = 40 }) |
| 68 | + @Html.Partial("../shared/_source-code.cshtml", new { Path, Snippet = "formulas-ephemeral", Size = 80 }) |
66 | 69 |
|
67 | 70 | @Html.Partial("_PartFormulas.cshtml", new { |
68 | 71 | ContentType = "FormulasEphemeral", |
|
78 | 81 |
|
79 | 82 | <h3>Configuration with parameters</h3> |
80 | 83 | <span> |
81 | | - <code>prefill:showAdvanced=true</code>: |
82 | | - <snippet id="formulas-showAdvanced-true"> |
83 | | - @Edit.Toolbar(toolbar: new[] { "toolbar=empty", "+new&icon=" + tbHlp.Icon() + "?contentType=FormulasParameters&prefill:showAdvanced=true"}) |
84 | | - </snippet> |
| 84 | +<snippet id="formulas-showAdvanced"> |
| 85 | + <code>prefill:showAdvanced=true</code>: |
| 86 | + @Kit.Toolbar.Empty().New("FormulasParameters", ui: "icon=" + tbHlp.Icon(), prefill: "showAdvanced=true").AsTag() |
85 | 87 | <br> |
86 | | - <code>prefill:showAdvanced=false</code>: |
87 | | - <snippet id="formulas-showAdvanced-false"> |
88 | | - @Edit.Toolbar(toolbar: new[] { "toolbar=empty", "+new&icon=" + tbHlp.Icon() + "?contentType=FormulasParameters&prefill:showAdvanced=false"}) |
89 | | - </snippet> |
| 88 | + <code>prefill:showAdvanced=false</code>: |
| 89 | + @Kit.Toolbar.Empty().New("FormulasParameters", ui: "icon=" + tbHlp.Icon(), prefill: "showAdvanced=false").AsTag() |
| 90 | +</snippet> |
90 | 91 | </span> |
91 | 92 | <p> |
92 | | - VarShowAdvanced is a parameter, thas was passed with the toolbar prefill. This formula determines the visibility of |
93 | | - the Advanced Settings group. The group becomes visible, when the passed VarShowAdvanced parameter is true. |
| 93 | + <code>showAdvanced</code> is a parameter, thas was passed with the toolbar prefill. This formula determines the visibility of |
| 94 | + the Advanced Settings group. The group becomes visible, when the passed <code>showAdvanced</code> parameter is true. |
94 | 95 | <br> |
95 | | - <em>Click on the (+) button above to see the edit-UI with the formula based on the passed prefill parameter. </em> |
| 96 | + <em>Click on the (Σ) button above to see the edit-UI with the formula based on the passed prefill parameter. </em> |
96 | 97 | </p> |
97 | 98 |
|
98 | 99 | <code id="formulas-showAdvanced-label"></code> |
99 | 100 | <hide-silent> @* Show only this snippet *@ |
100 | | - @Html.Partial("../shared/_source-code.cshtml", new { Path, Snippet = "formulas-showAdvanced-true", Size = 40 }) |
101 | | - @Html.Partial("../shared/_source-code.cshtml", new { Path, Snippet = "formulas-showAdvanced-false", Size = 40 }) |
| 101 | + @Html.Partial("../shared/_source-code.cshtml", new { Path, Snippet = "formulas-showAdvanced", Size = 120 }) |
102 | 102 |
|
103 | 103 | @Html.Partial("_PartFormulas.cshtml", new { |
104 | 104 | ContentType = "FormulasParameters", |
|
0 commit comments