Hi everyone,
I am using dynamic cms sites for help projects (for example: https://wmf-barmherzigkeit.webflow.io/hilfsaktionen/langfristhilfe-in-somalia. Since the published site will later have a duplicate in another country, I need href code to let google know about the copies. Therefore, I added a cms content filed inside tag to place my individual href-code. For some reason, webflow writes the code wrong. The code passage ends up in the body (see screenshots).
However, as you can see it’s HTML-encoded, which makes it useless here. You’ll need to decode that HTML using script in order to embed code that way.
As far as why your devtools are showing it in the body, I’ve seen this frequently as a bug in Firefox. Is that what you’re using here? Chrome is probably a better choice for devtools.
In the meantime I got Feedback from the support team – thanks a lot! This is the answer:
So the issue is that you are putting the actual meta tag into a cms field and then try to use the variable with the meta tag content in the head tag and at the moment this is not supported in Webflow.
The proper way to do this at the moment, would be to add your meta tag to the head as static text, then insert fields from the cms with static text content used for different values in the link meta tag.
For example, for the content in you screenshot which was appearing within the Body Tag, you would create a static tag in the head, then insert various fields from your CMS that may be dynamic.
See the example below where I have Add Text Field, you would replace that by clicking Add Field and select a field from your CMS to insert it’s unique value per collection item. For meta tag parts that will stay the same for each cms item, you just put the static parts and replace values that should be dynamic with CMS fields.
<link rel="Add Text Field" hreflang="Add Text Field" href="Add Text Field or URL Field" />
Then your dynamic link rel will be in the head and a republish is needed to update that on the published site.
Putting the whole tag into a cms field and trying to insert that field by itself in the head will not work.