From 8bc642dc6e434a8801ecd2acaef1e124b0907daf Mon Sep 17 00:00:00 2001 From: Jonathon Cove Date: Thu, 1 May 2025 17:12:01 +0100 Subject: [PATCH 1/3] Update itagquery.md --- 13/umbraco-cms/reference/querying/itagquery.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/13/umbraco-cms/reference/querying/itagquery.md b/13/umbraco-cms/reference/querying/itagquery.md index d6f2d68ca0a..152e2749f8e 100644 --- a/13/umbraco-cms/reference/querying/itagquery.md +++ b/13/umbraco-cms/reference/querying/itagquery.md @@ -48,6 +48,11 @@ public class TagApiController : UmbracoApiController `ITagQuery` is a scoped service, meaning that it should only be injected into scoped or transient services. For more information see the official [Microsoft Documentation](https://docs.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#scoped) {% endhint %} + +{% hint style="info" %} +For multi lingual sites, the desired language must be provided when using `ITagQuery` +{% endhint %} + ## Examples All examples are from a view using the injection shown above, but working with tags in controllers will be the same. From 99059e018a1f39e62128bc34754796caad8ddcdc Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Tue, 1 Jul 2025 11:42:00 +0200 Subject: [PATCH 2/3] Incorporated suggestion --- 13/umbraco-cms/reference/querying/itagquery.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/13/umbraco-cms/reference/querying/itagquery.md b/13/umbraco-cms/reference/querying/itagquery.md index 152e2749f8e..e2806d59ad1 100644 --- a/13/umbraco-cms/reference/querying/itagquery.md +++ b/13/umbraco-cms/reference/querying/itagquery.md @@ -14,7 +14,7 @@ If you're using it in Views or Partial views you can inject `ITagQuery` using th @inject ITagQuery _tagQuery; ``` -After this you can use `_tagQuery` to access the `ITagQuery`. +After this, you can use `_tagQuery` to access the `ITagQuery`. If your site supports multiple languages, you must specify the desired language when using `ITagQuery`. If you're using it in controllers, you can inject it into the constructor like so: @@ -48,11 +48,6 @@ public class TagApiController : UmbracoApiController `ITagQuery` is a scoped service, meaning that it should only be injected into scoped or transient services. For more information see the official [Microsoft Documentation](https://docs.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#scoped) {% endhint %} - -{% hint style="info" %} -For multi lingual sites, the desired language must be provided when using `ITagQuery` -{% endhint %} - ## Examples All examples are from a view using the injection shown above, but working with tags in controllers will be the same. From 82ce4aede5ff239c5f79fa31914a8d6bb1e89736 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Tue, 1 Jul 2025 11:44:40 +0200 Subject: [PATCH 3/3] Update 13/umbraco-cms/reference/querying/itagquery.md --- 13/umbraco-cms/reference/querying/itagquery.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/13/umbraco-cms/reference/querying/itagquery.md b/13/umbraco-cms/reference/querying/itagquery.md index e2806d59ad1..549e6306508 100644 --- a/13/umbraco-cms/reference/querying/itagquery.md +++ b/13/umbraco-cms/reference/querying/itagquery.md @@ -14,7 +14,9 @@ If you're using it in Views or Partial views you can inject `ITagQuery` using th @inject ITagQuery _tagQuery; ``` -After this, you can use `_tagQuery` to access the `ITagQuery`. If your site supports multiple languages, you must specify the desired language when using `ITagQuery`. +After this, you can use `_tagQuery` to access the `ITagQuery`. + +If your site supports multiple languages, you must specify the desired language when using `ITagQuery`. If you're using it in controllers, you can inject it into the constructor like so: