Try our conversational search powered by Generative AI!

Convert xhtml to string property type and strange behavior with languages on webpage

Vote:
 

There is something strange happening with converting property types via the Admin mode. I created a custom xhtml property type called "Heading" in my Standard page type template. I use this "Heading" property as an alternate heading for my webpage instead of using PageName.

I grab the "Heading" using this:

/// <summary>
        /// Returns the property Heading if set; otherwise the PageName is returned.
        /// </summary>
        protected string Heading
        {
            get
            {
                if (CurrentPage["Heading"] != null)
                {
                    return CurrentPage.Property["Heading"].ToWebString();
                }
                else
                {
                    return CurrentPage.Property["PageName"].ToWebString();
                }
            }
        }

 

I decided that I wanted to change my property type from xhtml to string. So I went into Admin mode > selected Page Type tab > selected my Standard page type. I edited the property "Heading" and just changed the xhtml property type to string. Once I made this change, then my heading started to display in a different language. For example, on my english language page it would display the mainbody text as english but my "Heading" property would display in spanish. What is even more strange is that it displays with the correct language when viewing in the Edit UI in Edit mode. This only happens when viewing through a browser, not in Edit UI in Edit mode.

Since this was a problem, I decided to change it back to type xhtml. I went back into Admin mode > selected Page Type tab again > selected "Heading" property and changed the type from xhtml back to string. It still has the same problem. It seems as if it is still stuck with the problem, even though I changed the property type back to the original type.

Has anyone else had this problem?

#38928
Apr 23, 2010 15:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.