title: replacing a variable text with other text in c#
body: <p>I am using c# and sitecore to basically use tokens in certain places ( see: <a href="https://stackoverflow.com/questions/36701532/how-to-create-a-custom-token-in-sitecore">how to create a custom token in sitecore</a> ). I think I have a solution, but am not sure as to why it is not working, even though I am getting no errors.</p>
  
  <pre><code>Item tokenItem = Sitecore.Context.Database.Items["/sitecore/content/Site Content/Tokens"];
  
  if (tokenItem.HasChildren)
  {
      var sValue = args.FieldValue.ToString();
  
      foreach (Item child in tokenItem.Children)
      {
          if (child.Template.Name == "Token")
          {
              string home = child.Fields["Title"].Value;
              string hContent = child.Fields["Content"].Value;
              if (sValue.Contains(home))
              {
                  home.Replace(home, hContent);
              }
          }
      }
  }
  </code></pre>
  
  <p>home and hContent pull up the correct values of each container, but when the page loads, it still has the "home" value inputted (the ie: @@sales) in the content area instead of the new value, which is stored in hContent. The sValue contains everything (tables, divs, text) and I was trying to single out a value that equals to "home" and replace the "home" value with hContent. What am I missing?</p>