Close

insert meta tag

peter@gramthomsen.dk
2 months ago
#14985 Quote
Avatar
  • 12
PM
i try to set this tag into the head section, i use "head_html_tag" on one page

<META NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW">

But i dosent work, it will just display the text "<META NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW">
" on top of th page.
SDobrev
2 months ago
#14988 Quote
Avatar
  • Moderator
  • 247
PM
This happens because of the nopCommerce Rich Text Editor. By default, it is escaping the meta tags. This editor is used all over nopCommerce administration including the Nop Html Widgets plugin.

The Rich Text Editor initializing can be found in the Views\Shared\EditorTemplates\RichEditor.cshtml. In the file, you will find examples of how to allow Javascript and Style tags. Use these templates to allow meta tags.
Best Regards,
Stoyan Dobrev
Nop-Templates.com
peter@gramthomsen.dk
2 months ago
#14990 Quote
Avatar
  • 12
PM
it must be this one:

//allow HTML body? Full page? - http://www.tinymce.com/wiki.php/Plugin:fullpage
    //false by default
    var enableFullPage = Convert.ToBoolean(ViewData["nop.RichEditor.EnableFullPage"] ?? false);

i tryed to change like this
var enableFullPage = Convert.ToBoolean(ViewData["nop.RichEditor.EnableFullPage"] ?? true);

but it wont make any difference ?
SDobrev
2 months ago
#14991 Quote
Avatar
  • Moderator
  • 247
PM
Hi,

You should add something like this:

extended_valid_elements.Add("meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme]");
valid_children.Add("+body[meta]");

Please note we haven't tested this solution. In the TinyMCE documentation, you will find out more information about the additional configuration.

https://www.tiny.cloud/docs/
Best Regards,
Stoyan Dobrev
Nop-Templates.com