Sitecore keywords in the metadata

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose.



Is it possible to get all the attached rendering datasource keywords on the page and display together in the Page Metadata?. I think I need to find the current page and iterate through all the renderings attached and then find a keyword text.



But will this have any performance issues or is there any better way to do it?



Any help or suggestions would be appreciated.



Thanks in advance










share|improve this question





















  • Something I learned using SXA is you can create a computed field which aggregates all the content you want. This way the text on data source items is treated like content of the page.
    – Michael West
    4 hours ago










  • @MichaelWest Is it possible in Sitecore 8.2 . Do you have any example link that would be helpful? Thanks
    – Owais Ahmed
    4 hours ago














up vote
1
down vote

favorite












Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose.



Is it possible to get all the attached rendering datasource keywords on the page and display together in the Page Metadata?. I think I need to find the current page and iterate through all the renderings attached and then find a keyword text.



But will this have any performance issues or is there any better way to do it?



Any help or suggestions would be appreciated.



Thanks in advance










share|improve this question





















  • Something I learned using SXA is you can create a computed field which aggregates all the content you want. This way the text on data source items is treated like content of the page.
    – Michael West
    4 hours ago










  • @MichaelWest Is it possible in Sitecore 8.2 . Do you have any example link that would be helpful? Thanks
    – Owais Ahmed
    4 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose.



Is it possible to get all the attached rendering datasource keywords on the page and display together in the Page Metadata?. I think I need to find the current page and iterate through all the renderings attached and then find a keyword text.



But will this have any performance issues or is there any better way to do it?



Any help or suggestions would be appreciated.



Thanks in advance










share|improve this question













Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose.



Is it possible to get all the attached rendering datasource keywords on the page and display together in the Page Metadata?. I think I need to find the current page and iterate through all the renderings attached and then find a keyword text.



But will this have any performance issues or is there any better way to do it?



Any help or suggestions would be appreciated.



Thanks in advance







presentation sitecore-api sitecore-query datasource seo






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Owais Ahmed

1184




1184











  • Something I learned using SXA is you can create a computed field which aggregates all the content you want. This way the text on data source items is treated like content of the page.
    – Michael West
    4 hours ago










  • @MichaelWest Is it possible in Sitecore 8.2 . Do you have any example link that would be helpful? Thanks
    – Owais Ahmed
    4 hours ago
















  • Something I learned using SXA is you can create a computed field which aggregates all the content you want. This way the text on data source items is treated like content of the page.
    – Michael West
    4 hours ago










  • @MichaelWest Is it possible in Sitecore 8.2 . Do you have any example link that would be helpful? Thanks
    – Owais Ahmed
    4 hours ago















Something I learned using SXA is you can create a computed field which aggregates all the content you want. This way the text on data source items is treated like content of the page.
– Michael West
4 hours ago




Something I learned using SXA is you can create a computed field which aggregates all the content you want. This way the text on data source items is treated like content of the page.
– Michael West
4 hours ago












@MichaelWest Is it possible in Sitecore 8.2 . Do you have any example link that would be helpful? Thanks
– Owais Ahmed
4 hours ago




@MichaelWest Is it possible in Sitecore 8.2 . Do you have any example link that would be helpful? Thanks
– Owais Ahmed
4 hours ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










This is going to be a horrible linky answer (Sorry moderators its too much code to put in an answer). But Sitecore's habitat example site that does this for assets. In the foundation.assets project, it gets styling and JavaScript from renderings and page content to assemble later on the page. Specifically it is this processor in the mvc.getPageRendering pipeline. It gets the values from a field the rendering and stuffs it into a singleton for later use in the page life cycle. You can just take it one step further and get the field from the datasource of the rendering.



<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<pipelines>
<mvc.getPageRendering>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetPageRendering.GetLayoutRendering, Sitecore.Mvc']" type="Sitecore.Foundation.Assets.Pipelines.GetPageRendering.AddRenderingAssets, Sitecore.Foundation.Assets"/>
</mvc.getPageRendering>
</pipelines>
</sitecore>
</configuration>


The moment it reads the field and adds it to the singleton is the line AssetRepository.Current.AddInlineStyling(cssInline, true);



public class AddRenderingAssets : GetPageRenderingProcessor

public override void Process(GetPageRenderingArgs args)

this.AddAssets(args.PageContext.PageDefinition.Renderings);


private void AddAssets(IEnumerable<Rendering> renderings)

foreach (var rendering in renderings)

var renderingItem = this.GetRenderingItem(rendering);
if (renderingItem == null)

return;


AddAssetsFromItem(renderingItem);



protected static void AddAssetsFromItem(Item renderingItem)

if (!renderingItem.IsDerived(Templates.RenderingAssets.ID))
return;
AddScriptAssetsFromRendering(renderingItem);
AddInlineScriptFromRendering(renderingItem);
AddStylingAssetsFromRendering(renderingItem);
AddInlineStylingFromAssets(renderingItem);


private static void AddInlineStylingFromAssets(Item renderingItem)

var cssInline = renderingItem[Templates.RenderingAssets.Fields.InlineStyling];
if (string.IsNullOrEmpty(cssInline))

return;

var asset = AssetRepository.Current.AddInlineStyling(cssInline, true);
asset.AddOnceToken = renderingItem.ID.ToString();





https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Pipelines/GetPageRendering/AddPageAssets.cs#L24



The singleton is here. It is marked as [ThreadStatic] so that it is regenerated for each thread request.
https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Repositories/AssetRepository.cs



public class AssetRepository

private static readonly AssetRequirementCache _cache = new AssetRequirementCache(StringUtil.ParseSizeString("10MB"));

[ThreadStatic]
private static AssetRepository _current;

private readonly List<Asset> _items = new List<Asset>();
private readonly List<ID> _seenRenderings = new List<ID>();

public static AssetRepository Current => _current ?? (_current = new AssetRepository());

internal IEnumerable<Asset> Items => this._items;

internal void Clear()

this._items.Clear();


public Asset Add(Asset asset, bool preventAddToCache = false)

if (asset == null)

throw new ArgumentNullException(nameof(asset));


........





Then in the cshtml file, the contents are read from the singleton and placed on the page. @RenderAssetsService.Current.RenderScript(ScriptLocation.Head)



https://github.com/Sitecore/Habitat/blob/master/src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml#L25



Similar to your request, you can gather all the fields from you datasources for your renderings, add them to a singleton and rendering them on the page.






share|improve this answer




















  • Thanks for the detailed answer Chris
    – Owais Ahmed
    2 hours ago










  • if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
    – Owais Ahmed
    2 hours ago










  • Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
    – Chris Auer
    1 hour ago










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "664"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f14804%2fsitecore-keywords-in-the-metadata%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










This is going to be a horrible linky answer (Sorry moderators its too much code to put in an answer). But Sitecore's habitat example site that does this for assets. In the foundation.assets project, it gets styling and JavaScript from renderings and page content to assemble later on the page. Specifically it is this processor in the mvc.getPageRendering pipeline. It gets the values from a field the rendering and stuffs it into a singleton for later use in the page life cycle. You can just take it one step further and get the field from the datasource of the rendering.



<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<pipelines>
<mvc.getPageRendering>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetPageRendering.GetLayoutRendering, Sitecore.Mvc']" type="Sitecore.Foundation.Assets.Pipelines.GetPageRendering.AddRenderingAssets, Sitecore.Foundation.Assets"/>
</mvc.getPageRendering>
</pipelines>
</sitecore>
</configuration>


The moment it reads the field and adds it to the singleton is the line AssetRepository.Current.AddInlineStyling(cssInline, true);



public class AddRenderingAssets : GetPageRenderingProcessor

public override void Process(GetPageRenderingArgs args)

this.AddAssets(args.PageContext.PageDefinition.Renderings);


private void AddAssets(IEnumerable<Rendering> renderings)

foreach (var rendering in renderings)

var renderingItem = this.GetRenderingItem(rendering);
if (renderingItem == null)

return;


AddAssetsFromItem(renderingItem);



protected static void AddAssetsFromItem(Item renderingItem)

if (!renderingItem.IsDerived(Templates.RenderingAssets.ID))
return;
AddScriptAssetsFromRendering(renderingItem);
AddInlineScriptFromRendering(renderingItem);
AddStylingAssetsFromRendering(renderingItem);
AddInlineStylingFromAssets(renderingItem);


private static void AddInlineStylingFromAssets(Item renderingItem)

var cssInline = renderingItem[Templates.RenderingAssets.Fields.InlineStyling];
if (string.IsNullOrEmpty(cssInline))

return;

var asset = AssetRepository.Current.AddInlineStyling(cssInline, true);
asset.AddOnceToken = renderingItem.ID.ToString();





https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Pipelines/GetPageRendering/AddPageAssets.cs#L24



The singleton is here. It is marked as [ThreadStatic] so that it is regenerated for each thread request.
https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Repositories/AssetRepository.cs



public class AssetRepository

private static readonly AssetRequirementCache _cache = new AssetRequirementCache(StringUtil.ParseSizeString("10MB"));

[ThreadStatic]
private static AssetRepository _current;

private readonly List<Asset> _items = new List<Asset>();
private readonly List<ID> _seenRenderings = new List<ID>();

public static AssetRepository Current => _current ?? (_current = new AssetRepository());

internal IEnumerable<Asset> Items => this._items;

internal void Clear()

this._items.Clear();


public Asset Add(Asset asset, bool preventAddToCache = false)

if (asset == null)

throw new ArgumentNullException(nameof(asset));


........





Then in the cshtml file, the contents are read from the singleton and placed on the page. @RenderAssetsService.Current.RenderScript(ScriptLocation.Head)



https://github.com/Sitecore/Habitat/blob/master/src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml#L25



Similar to your request, you can gather all the fields from you datasources for your renderings, add them to a singleton and rendering them on the page.






share|improve this answer




















  • Thanks for the detailed answer Chris
    – Owais Ahmed
    2 hours ago










  • if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
    – Owais Ahmed
    2 hours ago










  • Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
    – Chris Auer
    1 hour ago














up vote
3
down vote



accepted










This is going to be a horrible linky answer (Sorry moderators its too much code to put in an answer). But Sitecore's habitat example site that does this for assets. In the foundation.assets project, it gets styling and JavaScript from renderings and page content to assemble later on the page. Specifically it is this processor in the mvc.getPageRendering pipeline. It gets the values from a field the rendering and stuffs it into a singleton for later use in the page life cycle. You can just take it one step further and get the field from the datasource of the rendering.



<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<pipelines>
<mvc.getPageRendering>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetPageRendering.GetLayoutRendering, Sitecore.Mvc']" type="Sitecore.Foundation.Assets.Pipelines.GetPageRendering.AddRenderingAssets, Sitecore.Foundation.Assets"/>
</mvc.getPageRendering>
</pipelines>
</sitecore>
</configuration>


The moment it reads the field and adds it to the singleton is the line AssetRepository.Current.AddInlineStyling(cssInline, true);



public class AddRenderingAssets : GetPageRenderingProcessor

public override void Process(GetPageRenderingArgs args)

this.AddAssets(args.PageContext.PageDefinition.Renderings);


private void AddAssets(IEnumerable<Rendering> renderings)

foreach (var rendering in renderings)

var renderingItem = this.GetRenderingItem(rendering);
if (renderingItem == null)

return;


AddAssetsFromItem(renderingItem);



protected static void AddAssetsFromItem(Item renderingItem)

if (!renderingItem.IsDerived(Templates.RenderingAssets.ID))
return;
AddScriptAssetsFromRendering(renderingItem);
AddInlineScriptFromRendering(renderingItem);
AddStylingAssetsFromRendering(renderingItem);
AddInlineStylingFromAssets(renderingItem);


private static void AddInlineStylingFromAssets(Item renderingItem)

var cssInline = renderingItem[Templates.RenderingAssets.Fields.InlineStyling];
if (string.IsNullOrEmpty(cssInline))

return;

var asset = AssetRepository.Current.AddInlineStyling(cssInline, true);
asset.AddOnceToken = renderingItem.ID.ToString();





https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Pipelines/GetPageRendering/AddPageAssets.cs#L24



The singleton is here. It is marked as [ThreadStatic] so that it is regenerated for each thread request.
https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Repositories/AssetRepository.cs



public class AssetRepository

private static readonly AssetRequirementCache _cache = new AssetRequirementCache(StringUtil.ParseSizeString("10MB"));

[ThreadStatic]
private static AssetRepository _current;

private readonly List<Asset> _items = new List<Asset>();
private readonly List<ID> _seenRenderings = new List<ID>();

public static AssetRepository Current => _current ?? (_current = new AssetRepository());

internal IEnumerable<Asset> Items => this._items;

internal void Clear()

this._items.Clear();


public Asset Add(Asset asset, bool preventAddToCache = false)

if (asset == null)

throw new ArgumentNullException(nameof(asset));


........





Then in the cshtml file, the contents are read from the singleton and placed on the page. @RenderAssetsService.Current.RenderScript(ScriptLocation.Head)



https://github.com/Sitecore/Habitat/blob/master/src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml#L25



Similar to your request, you can gather all the fields from you datasources for your renderings, add them to a singleton and rendering them on the page.






share|improve this answer




















  • Thanks for the detailed answer Chris
    – Owais Ahmed
    2 hours ago










  • if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
    – Owais Ahmed
    2 hours ago










  • Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
    – Chris Auer
    1 hour ago












up vote
3
down vote



accepted







up vote
3
down vote



accepted






This is going to be a horrible linky answer (Sorry moderators its too much code to put in an answer). But Sitecore's habitat example site that does this for assets. In the foundation.assets project, it gets styling and JavaScript from renderings and page content to assemble later on the page. Specifically it is this processor in the mvc.getPageRendering pipeline. It gets the values from a field the rendering and stuffs it into a singleton for later use in the page life cycle. You can just take it one step further and get the field from the datasource of the rendering.



<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<pipelines>
<mvc.getPageRendering>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetPageRendering.GetLayoutRendering, Sitecore.Mvc']" type="Sitecore.Foundation.Assets.Pipelines.GetPageRendering.AddRenderingAssets, Sitecore.Foundation.Assets"/>
</mvc.getPageRendering>
</pipelines>
</sitecore>
</configuration>


The moment it reads the field and adds it to the singleton is the line AssetRepository.Current.AddInlineStyling(cssInline, true);



public class AddRenderingAssets : GetPageRenderingProcessor

public override void Process(GetPageRenderingArgs args)

this.AddAssets(args.PageContext.PageDefinition.Renderings);


private void AddAssets(IEnumerable<Rendering> renderings)

foreach (var rendering in renderings)

var renderingItem = this.GetRenderingItem(rendering);
if (renderingItem == null)

return;


AddAssetsFromItem(renderingItem);



protected static void AddAssetsFromItem(Item renderingItem)

if (!renderingItem.IsDerived(Templates.RenderingAssets.ID))
return;
AddScriptAssetsFromRendering(renderingItem);
AddInlineScriptFromRendering(renderingItem);
AddStylingAssetsFromRendering(renderingItem);
AddInlineStylingFromAssets(renderingItem);


private static void AddInlineStylingFromAssets(Item renderingItem)

var cssInline = renderingItem[Templates.RenderingAssets.Fields.InlineStyling];
if (string.IsNullOrEmpty(cssInline))

return;

var asset = AssetRepository.Current.AddInlineStyling(cssInline, true);
asset.AddOnceToken = renderingItem.ID.ToString();





https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Pipelines/GetPageRendering/AddPageAssets.cs#L24



The singleton is here. It is marked as [ThreadStatic] so that it is regenerated for each thread request.
https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Repositories/AssetRepository.cs



public class AssetRepository

private static readonly AssetRequirementCache _cache = new AssetRequirementCache(StringUtil.ParseSizeString("10MB"));

[ThreadStatic]
private static AssetRepository _current;

private readonly List<Asset> _items = new List<Asset>();
private readonly List<ID> _seenRenderings = new List<ID>();

public static AssetRepository Current => _current ?? (_current = new AssetRepository());

internal IEnumerable<Asset> Items => this._items;

internal void Clear()

this._items.Clear();


public Asset Add(Asset asset, bool preventAddToCache = false)

if (asset == null)

throw new ArgumentNullException(nameof(asset));


........





Then in the cshtml file, the contents are read from the singleton and placed on the page. @RenderAssetsService.Current.RenderScript(ScriptLocation.Head)



https://github.com/Sitecore/Habitat/blob/master/src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml#L25



Similar to your request, you can gather all the fields from you datasources for your renderings, add them to a singleton and rendering them on the page.






share|improve this answer












This is going to be a horrible linky answer (Sorry moderators its too much code to put in an answer). But Sitecore's habitat example site that does this for assets. In the foundation.assets project, it gets styling and JavaScript from renderings and page content to assemble later on the page. Specifically it is this processor in the mvc.getPageRendering pipeline. It gets the values from a field the rendering and stuffs it into a singleton for later use in the page life cycle. You can just take it one step further and get the field from the datasource of the rendering.



<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<pipelines>
<mvc.getPageRendering>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetPageRendering.GetLayoutRendering, Sitecore.Mvc']" type="Sitecore.Foundation.Assets.Pipelines.GetPageRendering.AddRenderingAssets, Sitecore.Foundation.Assets"/>
</mvc.getPageRendering>
</pipelines>
</sitecore>
</configuration>


The moment it reads the field and adds it to the singleton is the line AssetRepository.Current.AddInlineStyling(cssInline, true);



public class AddRenderingAssets : GetPageRenderingProcessor

public override void Process(GetPageRenderingArgs args)

this.AddAssets(args.PageContext.PageDefinition.Renderings);


private void AddAssets(IEnumerable<Rendering> renderings)

foreach (var rendering in renderings)

var renderingItem = this.GetRenderingItem(rendering);
if (renderingItem == null)

return;


AddAssetsFromItem(renderingItem);



protected static void AddAssetsFromItem(Item renderingItem)

if (!renderingItem.IsDerived(Templates.RenderingAssets.ID))
return;
AddScriptAssetsFromRendering(renderingItem);
AddInlineScriptFromRendering(renderingItem);
AddStylingAssetsFromRendering(renderingItem);
AddInlineStylingFromAssets(renderingItem);


private static void AddInlineStylingFromAssets(Item renderingItem)

var cssInline = renderingItem[Templates.RenderingAssets.Fields.InlineStyling];
if (string.IsNullOrEmpty(cssInline))

return;

var asset = AssetRepository.Current.AddInlineStyling(cssInline, true);
asset.AddOnceToken = renderingItem.ID.ToString();





https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Pipelines/GetPageRendering/AddPageAssets.cs#L24



The singleton is here. It is marked as [ThreadStatic] so that it is regenerated for each thread request.
https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Repositories/AssetRepository.cs



public class AssetRepository

private static readonly AssetRequirementCache _cache = new AssetRequirementCache(StringUtil.ParseSizeString("10MB"));

[ThreadStatic]
private static AssetRepository _current;

private readonly List<Asset> _items = new List<Asset>();
private readonly List<ID> _seenRenderings = new List<ID>();

public static AssetRepository Current => _current ?? (_current = new AssetRepository());

internal IEnumerable<Asset> Items => this._items;

internal void Clear()

this._items.Clear();


public Asset Add(Asset asset, bool preventAddToCache = false)

if (asset == null)

throw new ArgumentNullException(nameof(asset));


........





Then in the cshtml file, the contents are read from the singleton and placed on the page. @RenderAssetsService.Current.RenderScript(ScriptLocation.Head)



https://github.com/Sitecore/Habitat/blob/master/src/Project/Habitat/code/Views/Website/Layouts/Default.cshtml#L25



Similar to your request, you can gather all the fields from you datasources for your renderings, add them to a singleton and rendering them on the page.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









Chris Auer

6,6851940




6,6851940











  • Thanks for the detailed answer Chris
    – Owais Ahmed
    2 hours ago










  • if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
    – Owais Ahmed
    2 hours ago










  • Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
    – Chris Auer
    1 hour ago
















  • Thanks for the detailed answer Chris
    – Owais Ahmed
    2 hours ago










  • if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
    – Owais Ahmed
    2 hours ago










  • Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
    – Chris Auer
    1 hour ago















Thanks for the detailed answer Chris
– Owais Ahmed
2 hours ago




Thanks for the detailed answer Chris
– Owais Ahmed
2 hours ago












if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
– Owais Ahmed
2 hours ago




if the datasource has image assets which has its own keyword. Can we go one level down and are there any performance issues?
– Owais Ahmed
2 hours ago












Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
– Chris Auer
1 hour ago




Once you have the datasource item, you can go anywhere you want. But I would look into caching the metadata values. The more renderings you have on a page, the more calls to Sitecore it is going to be making.
– Chris Auer
1 hour ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f14804%2fsitecore-keywords-in-the-metadata%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

Confectionery