Making Social / Meta info easier to update for Blog posts
This is what I would like to do:
- Move all of the Meta Data information from the Meta and Social tab into the main blog post editing tab.
- Have all of the Facebook / Twitter social / open graph data automatically populated by the relevant info e.g. 'Social Title' would be the blog post title and 'Image when shared' would be the main image that goes with the blog post.
How would I go about doing these things? I think this makes it much easier for the editors of the website as the second tab is often forgotten about and some of it would be duplicate information from the first tab.
Thanks, Mike.
There isn't an option for that. We actually moved all that stuff out of the main form because people were complaining that it was too much information to collect at once and the form was too long.
Ah OK. That's a shame - I obviously think differently to everyone else then! Would be certainly be a nice option to have in terms of a feature suggestion. Especially the part about pre-filling social data with existing fields.
The common fields should automatically pre-fill already.
Just checked again. The "Social title" pre-fills ok, but the "Social description" includes HTML tags which need to be deleted manually. The "Image when shared" doesn't use the main post image.
Also, when you click 'Save' on the first tab of editing a blog post it does not save the information that is prefilled in the second tab, so you end up having to hit Save in both tabs in order for everything to update.
Right - it doesn't copy the content, it pre-fills the edit form. You still need to save it.
As a post can have any fields you like (including things like and image or not) we can't automatically pre-fill everything.
Ok. What about the HTML tags? I've tried adding "striptags=true" to the "og-description" tag in post_meta.html but it does nothing. Is there another way of removing the HTML automatically in the Social description field?
The syntax should be
That's what I meant sorry. That doesn't work unfortunately.
Without your code I can only make guesses. Are you storing HTML? If you're encoding it then they won't be tags anymore and won't get stripped.
I'm pretty much using Perch Blog 'out-of-the-box' so to speak with the exception of using ckeditor instead of markitup in all cases:
Ok, and where is the
striptags
attribute that isn't working?That should work fine.
Nope, afraid not sorry! Seems to be a problem related to me using ckeditor and html.
If I use Markitup and markdown it works fine:
The problem is, I want to use ckeditor as my client prefers a WYSIWYG editor.
If you're using CKEditor for both, isn't CKEditor using the HTML it's given?
Yes but when you try sharing the blog post to Facebook you get "pSome content/p"
It seems implausible that
striptags
isn't working. Are you sure you have the attribute in the correct template?I have it in the post_meta.html template as shown above.
Is that the template you're using to output the content to the page?
If that is what happens by default using
then yes.