I have a Razor script that is rendering html and including various doctype properties within the html. I have been trying to wrap some of the div's within tags that contanin the property for the url on the doctype, but when I do this it doesn't clost the tag in the correct place even though it clearly is in the correct spot within my Razor. Could someone take a look at this and help me figure this out please? Here is my page and my Razor:
It appears that it has to do with the rich text editor, but I don't know why. When you add any <a> tag within a rich text editor property on the page Umbraco is including it in the first test for "featureBoxUrl" and creates a duplicate <a> tag with the class of "featureBox", which is a floated item, so the layout is then broken. There may be other things going on, but I don't know why. I would really appreaciate someone trying to recreate this error as I think its a bug.
If i understand correctly you have created featureBox1Content with an <a> tag which links to an umbraco page, but your featureBox1Content is wrap inside of an <a> tag in your code.
If Else Behaving Strange
I have a Razor script that is rendering html and including various doctype properties within the html. I have been trying to wrap some of the div's within tags that contanin the property for the url on the doctype, but when I do this it doesn't clost the tag in the correct place even though it clearly is in the correct spot within my Razor. Could someone take a look at this and help me figure this out please? Here is my page and my Razor:
https://edit-wwwprep.rose-hulman.edu/about/leadership/presidents-office-(new).aspx
There are three "featureBox"s and when I add an inline link on the actual umbraco page within the "featureBox1Content" rich text area, it ends the "featureBox" wrapping tag too early. I don't see how this is possible. Help would be appreaciated greatly.
It appears that it has to do with the rich text editor, but I don't know why. When you add any <a> tag within a rich text editor property on the page Umbraco is including it in the first test for "featureBoxUrl" and creates a duplicate <a> tag with the class of "featureBox", which is a floated item, so the layout is then broken. There may be other things going on, but I don't know why. I would really appreaciate someone trying to recreate this error as I think its a bug.
Hi Steve,
If i understand correctly you have created featureBox1Content with an
<a>
tag which links to an umbraco page, but your featureBox1Content is wrap inside of an<a>
tag in your code.Assuming featureBox1Conent is the following:
And you Have
Your Output will be:
You end up with nested anchors which is invalid HTML.
Hope this helps
Ahh! Thanks Justin! I can't believe I didn't even think of that!
So, is Umbraco stripping out one of the a tags, because when it generates the page it is missing the second starting <a> tag? Just curious.
Hi Steve,
I don't think it is umbraco stripping anything out. I'd say it's probably the Razor Render Engine getting it's knickers in a twist.
Glad i can help :) Can you mark this as solved please.
cheers
is working on a reply...