- Renders the contents of a child template, by inserting a
- @RenderBody() placeholder.
+
-
+
-
Render a named section
+
- Renders a named area of a child template, by insert a @RenderSection(name) placeholder.
- This renders an area of a child template which is wrapped in a corresponding @section [name]{ ... } definition.
+
-
+
-
- Set the name of the section to render in this area of the template
-
+
- If mandatory, the child template must contain a @section definition, otherwise an error is shown.
+
-
+
-
Define a named section
+
- Defines a part of your template as a named section by wrapping it in
- a @section { ... }. This can be rendered in a
- specific area of the master of this template, by using @RenderSection.
+
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
index b0452fb631..9ee79ce8d8 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml
@@ -291,6 +291,7 @@
Vælg medlemVælg medlemsgruppeDer er ingen parametre for denne makro
+ Der er ikke tilføjet nogen makroerLink ditFjern link fra ditkonto
@@ -1004,17 +1005,117 @@ Mange hilsner fra Umbraco robotten
Vis prøveStyles
+
Rediger skabelon
+
+ SektionerIndsæt indholdsområde
- Indsæt indholdsområdemarkering
- Indsæt ordbogselement
- Indsæt makro
- Indsæt Umbraco sidefelt
+ Indsæt pladsholder for indholdsområde
+
+ Indsæt
+ Hvad vil du indsætte ?
+
+ Oversættelse
+ Indsætter en oversætbar tekst, som skifter efter det sprog, som websitet vises i.
+
+ Makro
+
+ En makro er et element, som kan have forskellige indstillinger, når det indsættes.
+ Brug det som en genbrugelig del af dit design såsom gallerier, formularer og lister.
+
+
+ Sideværdi
+
+ Viser værdien af et felt fra den nuværende side. Kan indstilles til at bruge rekursive værdier eller
+ vise en standardværdi i tilfælde af, at feltet er tomt.
+
+
+ Partial view
+
+ Et Partial View er et skabelonelement, som kan indsættes i andre skabeloner og derved
+ genbruges og deles på tværs af sideskabelonerne.
+
+
Master skabelon
- Lynguide til Umbracos skabelontags
+ Ingen masterskabelon
+ Ingen master
+
+ Indsæt en underliggende skabelon
+
+ @RenderBody() element.
+ ]]>
+
+
+
+ Definer en sektion
+
+ @section { ... }. Herefter kan denne sektion flettes ind i
+ overliggende skabelon ved at indsætte et @RenderSection element.
+ ]]>
+
+
+ Indsæt en sektion
+
+ @RenderSection(name) element. Den underliggende skabelon skal have
+ defineret en sektion via et @section [name]{ ... } element.
+ ]]>
+
+
+ Sektionsnavn
+ Sektionen er obligatorisk
+
+
+ Hvis obligatorisk, skal underskabelonen indeholde en @section -definition.
+
+
+
+ Query builder
+ sider returneret, på
+
+ Returner
+ alt indhold
+ indhold af typen "%0%"
+
+ fra
+ mit website
+ filtre
+ og
+
+ is
+ is not
+ before
+ before (including selected date)
+ after
+ after (including selected date)
+ equals
+ does not equal
+ contains
+ does not contain
+ greater than
+ greater than or equal to
+ less than
+ less than or equal to
+
+ Id
+ Name
+ Created Date
+ Last Updated Date
+
+ order by
+ ascending
+ descending
+
Skabelon
+
+
Alternativt feltAlternativ tekst
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
index 2021be1d9d..444ecc2e3d 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
@@ -305,6 +305,7 @@
Select member groupNo icons were foundThere are no parameters for this macro
+ There are no macros available to insertExternal login providersException DetailsStacktrace
@@ -1032,6 +1033,9 @@ To manage your website, simply open the Umbraco back office and start adding con
SectionsInsert content areaInsert content area placeholder
+
+ Insert
+ Choose what to insert into your templateDictionary itemA dictionary item is a placeholder for a translatable piece of text, which makes it easy to create designs for multilingual websites.
@@ -1053,18 +1057,79 @@ To manage your website, simply open the Umbraco back office and start adding con
Master template
+ No master template
+ No master
+
+ Render child template
+
+ @RenderBody() placeholder.
+ ]]>
+
+
+
+ Define a named section
+
+ @section { ... }. This can be rendered in a
+ specific area of the parent of this template, by using @RenderSection.
+ ]]>
+
+
+ Render a named section
+
+ @RenderSection(name) placeholder.
+ This renders an area of a child template which is wrapped in a corresponding @section [name]{ ... } definition.
+ ]]>
+
+
+ Section Name
+ Section is mandatory
+
+ If mandatory, the child template must contain a @section definition, otherwise an error is shown.
+
+
Query builderitems returned, in
- I want
+ I want
+ all content
+ content of type "%0%"from
+ my websitewhereand
- everything
+ is
+ is not
+ before
+ before (including selected date)
+ after
+ after (including selected date)
+ equals
+ does not equal
+ contains
+ does not contain
+ greater than
+ greater than or equal to
+ less than
+ less than or equal to
+
+ Id
+ Name
+ Created Date
+ Last Updated Date
+
+ order by
+ ascending
+ descendingTemplate
+
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
index f68359b0af..aa9f33695d 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
@@ -1027,13 +1027,105 @@ To manage your website, simply open the Umbraco back office and start adding con
Edit template
+
+ SectionsInsert content areaInsert content area placeholder
- Insert dictionary item
- Insert Macro
- Insert Umbraco page field
+
+ Insert
+ Choose what to insert into your template
+
+ Dictionary item
+ A dictionary item is a placeholder for a translatable piece of text, which makes it easy to create designs for multilingual websites.
+
+ Macro
+
+ A Macro is a configurable component which is great for
+ reusable parts of your design, where you need the option to provide parameters,
+ such as galleries, forms and lists.
+
+
+ Value
+ Displays the value of a named field from the current page, with options to modify the value or fallback to alternative values.
+
+ Partial view
+
+ A partial view is a separate template file which can be rendered inside another
+ template, it's great for reusing markup or for separating complex templates into separate files.
+
+
Master template
- Quick Guide to Umbraco template tags
+ No master template
+ No master
+
+ Render child template
+
+ @RenderBody() placeholder.
+ ]]>
+
+
+
+ Define a named section
+
+ @section { ... }. This can be rendered in a
+ specific area of the parent of this template, by using @RenderSection.
+ ]]>
+
+
+ Render a named section
+
+ @RenderSection(name) placeholder.
+ This renders an area of a child template which is wrapped in a corresponding @section [name]{ ... } definition.
+ ]]>
+
+
+ Section Name
+ Section is mandatory
+
+ If mandatory, the child template must contain a @section definition, otherwise an error is shown.
+
+
+
+ Query builder
+ items returned, in
+
+ I want
+ all content
+ content of type "%0%"
+ from
+ my website
+ where
+ and
+
+ is
+ is not
+ before
+ before (including selected date)
+ after
+ after (including selected date)
+ equals
+ does not equal
+ contains
+ does not contain
+ greater than
+ greater than or equal to
+ less than
+ less than or equal to
+
+ Id
+ Name
+ Created Date
+ Last Updated Date
+
+ order by
+ ascending
+ descending
+
Template
diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs
index e3c63dd22e..cd004fe926 100644
--- a/src/Umbraco.Web/Editors/TemplateQueryController.cs
+++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs
@@ -9,6 +9,7 @@ using System;
using System.Diagnostics;
using Umbraco.Web.Dynamics;
using Umbraco.Web.Models.TemplateQuery;
+using Umbraco.Core.Services;
namespace Umbraco.Web.Editors
{
@@ -29,33 +30,44 @@ namespace Umbraco.Web.Editors
{ }
- private static readonly IEnumerable Terms = new List()
+ private IEnumerable Terms
+ {
+ get
{
- new OperathorTerm("is", Operathor.Equals, new [] {"string"}),
- new OperathorTerm("is not", Operathor.NotEquals, new [] {"string"}),
- new OperathorTerm("before", Operathor.LessThan, new [] {"datetime"}),
- new OperathorTerm("before (including selected date)", Operathor.LessThanEqualTo, new [] {"datetime"}),
- new OperathorTerm("after", Operathor.GreaterThan, new [] {"datetime"}),
- new OperathorTerm("after (including selected date)", Operathor.GreaterThanEqualTo, new [] {"datetime"}),
- new OperathorTerm("equals", Operathor.Equals, new [] {"int"}),
- new OperathorTerm("does not equal", Operathor.NotEquals, new [] {"int"}),
- new OperathorTerm("contains", Operathor.Contains, new [] {"string"}),
- new OperathorTerm("does not contain", Operathor.NotContains, new [] {"string"}),
- new OperathorTerm("greater than", Operathor.GreaterThan, new [] {"int"}),
- new OperathorTerm("greater than or equal to", Operathor.GreaterThanEqualTo, new [] {"int"}),
- new OperathorTerm("less than", Operathor.LessThan, new [] {"int"}),
- new OperathorTerm("less than or equal to", Operathor.LessThanEqualTo, new [] {"int"})
- };
+ return new List()
+ {
+ new OperathorTerm(Services.TextService.Localize("template/is"), Operathor.Equals, new [] {"string"}),
+ new OperathorTerm(Services.TextService.Localize("template/isNot"), Operathor.NotEquals, new [] {"string"}),
+ new OperathorTerm(Services.TextService.Localize("template/before"), Operathor.LessThan, new [] {"datetime"}),
+ new OperathorTerm(Services.TextService.Localize("template/beforeIncDate"), Operathor.LessThanEqualTo, new [] {"datetime"}),
+ new OperathorTerm(Services.TextService.Localize("template/after"), Operathor.GreaterThan, new [] {"datetime"}),
+ new OperathorTerm(Services.TextService.Localize("template/afterIncDate"), Operathor.GreaterThanEqualTo, new [] {"datetime"}),
+ new OperathorTerm(Services.TextService.Localize("template/equals"), Operathor.Equals, new [] {"int"}),
+ new OperathorTerm(Services.TextService.Localize("template/doesNotEqual"), Operathor.NotEquals, new [] {"int"}),
+ new OperathorTerm(Services.TextService.Localize("template/contains"), Operathor.Contains, new [] {"string"}),
+ new OperathorTerm(Services.TextService.Localize("template/doesNotContain"), Operathor.NotContains, new [] {"string"}),
+ new OperathorTerm(Services.TextService.Localize("template/greaterThan"), Operathor.GreaterThan, new [] {"int"}),
+ new OperathorTerm(Services.TextService.Localize("template/greaterThanEqual"), Operathor.GreaterThanEqualTo, new [] {"int"}),
+ new OperathorTerm(Services.TextService.Localize("template/lessThan"), Operathor.LessThan, new [] {"int"}),
+ new OperathorTerm(Services.TextService.Localize("template/lessThanEqual"), Operathor.LessThanEqualTo, new [] {"int"})
+ };
+ }
+ }
- private static readonly IEnumerable Properties = new List()
+ private IEnumerable Properties
+ {
+ get
{
- new PropertyModel() { Name = "Id", Alias = "Id", Type = "int" },
- new PropertyModel() { Name = "Name", Alias = "Name", Type = "string" },
- //new PropertyModel() { Name = "Url", Alias = "url", Type = "string" },
- new PropertyModel() { Name = "Created Date", Alias = "CreateDate", Type = "datetime" },
- new PropertyModel() { Name = "Last Updated Date", Alias = "UpdateDate", Type = "datetime" }
-
- };
+ return new List()
+ {
+ new PropertyModel() {Name = Services.TextService.Localize("template/id"), Alias = "Id", Type = "int"},
+ new PropertyModel() {Name = Services.TextService.Localize("template/name"), Alias = "Name", Type = "string"},
+ //new PropertyModel() { Name = "Url", Alias = "url", Type = "string" },
+ new PropertyModel() {Name = Services.TextService.Localize("template/createdDate"), Alias = "CreateDate", Type = "datetime"},
+ new PropertyModel() {Name = Services.TextService.Localize("template/lastUpdatedDate"), Alias = "UpdateDate", Type = "datetime"}
+ };
+ }
+ }
public QueryResultModel PostTemplateQuery(QueryModel model)
{
@@ -297,9 +309,10 @@ namespace Umbraco.Web.Editors
{
var contentTypes =
ApplicationContext.Services.ContentTypeService.GetAllContentTypes()
- .Select(x => new ContentTypeModel() { Alias = x.Alias, Name = x.Name })
+ .Select(x => new ContentTypeModel() { Alias = x.Alias, Name = Services.TextService.Localize("template/contentOfType", tokens: new string[] { x.Name } ) })
.OrderBy(x => x.Name).ToList();
- contentTypes.Insert(0, new ContentTypeModel() { Alias = string.Empty, Name = "Everything" });
+
+ contentTypes.Insert(0, new ContentTypeModel() { Alias = string.Empty, Name = Services.TextService.Localize("template/allContent") });
return contentTypes;
}
diff --git a/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs b/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs
index 8e813bd3d3..91c1aefdb0 100644
--- a/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs
+++ b/src/Umbraco.Web/Models/ContentEditing/TemplateDisplay.cs
@@ -36,6 +36,9 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "masterTemplateAlias")]
public string MasterTemplateAlias { get; set; }
+ [DataMember(Name = "isMasterTemplate")]
+ public bool IsMasterTemplate { get; set; }
+
///
/// This is used to add custom localized messages/strings to the response for the app to use for localized UI purposes.
///