<commit_before>﻿using System.Linq;
using Sitecore.Mvc.Helpers;
using Sitecore.Mvc.Presentation;
using System.Collections.Generic;
using System.Web;

namespace DynamicPlaceholders.Mvc.Extensions
{
	public static class SitecoreHelperExtensions
	{
		public static List<string> DynamicPlaceholders = new List<string>();

		public static HtmlString DynamicPlaceholder(this SitecoreHelper helper, string placeholderName)
		{
			var placeholder = string.Format("{0}_{1}", placeholderName, RenderingContext.Current.Rendering.UniqueId);
			var count = 0;

			if ((count = DynamicPlaceholders.Count(dp => dp.StartsWith(placeholder))) > 0)
			{
				placeholder = string.Format("{0}_{1}", placeholder, count);

				DynamicPlaceholders.Add(placeholder);
			}

			return helper.Placeholder(placeholder);
		}
	}
}<commit_msg>Revert "Added ability to have more than one dynamic placeholder in the same rendering"<commit_after>﻿using Sitecore.Mvc.Helpers;
using Sitecore.Mvc.Presentation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace DynamicPlaceholders.Mvc.Extensions
{
	public static class SitecoreHelperExtensions
	{
		public static HtmlString DynamicPlaceholder(this SitecoreHelper helper, string placeholderName)
		{
			var currentRenderingId = RenderingContext.Current.Rendering.UniqueId;

			return helper.Placeholder(string.Format("{0}_{1}", placeholderName, currentRenderingId));
		}
	}
}
{'fraction_non_alphanumeric': 0.09932432432432432, 'fraction_numerical': 0.005405405405405406, 'mean_word_length': 5.824884792626728, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1793474', 'n_tokens_mistral': 447, 'n_tokens_neox': 417, 'n_words': 100}