Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

SS 3.1 page Custom MetaTags re-formats <meta> tags


Go to End


4 Posts   968 Views

Avatar
AD5XJ

Community Member, 35 Posts

24 September 2014 at 7:13am

Edited: 25/09/2014 7:54am

I have noticed that tinyMCE re-formats the text typed in the Custom MetaTags area concatenating everything onto one line.

Is there a way to tell tinyMCE to use the Custom MetaTag text as entered?

I also notice that the custom tags are inserted into page text at col number one rather than the same column as the previous line. Where do I correct this?

UPDATE: I have been thinking about this a while. I wonder if it is more an issue of the page definition where only one Custom MetaTag entry is defined. Maybe there needs to be an addition to this page definition that will allow multiple Custom MetaTag entries - each treated as a unique <meta /> on separate source lines and processed as a collection much as images are handled in a carousel. Regardless, the described concatenation makes reading and debugging <meta> tags very difficult even if it is acceptable to the rendering engine.

This kind of code output customization of the base files is not well documented and really needs to be improved.

Avatar
camfindlay

Forum Moderator, 267 Posts

2 October 2014 at 4:02pm

Hey there, I don't think TinyMCE has anything to do with the formatting of the Customer meta field... it is a separate Textarea Field from what I remember. HOwever you are right in that the meta tags do get concatenated into a single line. Perhaps you could suggest an improvement over at http://silverstripe.uservoice.com

Avatar
AD5XJ

Community Member, 35 Posts

3 October 2014 at 3:49am

Camfindlay

I think the UPDATE clause answers your needs. Please re-read my post - with the updates. I will make the suggestion on the uservoice.com site.

Avatar
camfindlay

Forum Moderator, 267 Posts

3 October 2014 at 9:19am

Perhaps it is just an update to the way SilverStripe parses the tags rather than requiring an extra interface? On another note, I think you could perhaps easily build a module that does this if you really are keen :) A DataObject and a GridField added to the Page class is likely all you'd need.