Hi Folks! Keeping up with a series of added features to the BlogEngine.NET 3.3.5, this time I wanna show you the option to add a header image to posts, using the current CustomFields feature of the CMS (without adding new columns/members to the original classes).
The reason behind the feature
Well, first is to make our blogs look cooler (by modifying some files from the admin section and 2 themes that come with the default 3.3.5 blogengine). And second, the main reason actually, is to improve user engagement to our blogs. Shared links with cool header images on social media, like Facebook and Google Plus, seems more attractive to click on than simple/plain text. A dedicated field for adding a header image will help us later create the meta information to complain with social media engines, rather than simply adding an image on top of post contents.
Download the branch called morefeatures in my github, open the solution on your Visual Studio and hit play. Access the admin pages and go to Content > Posts and edit the Welcome post. You will notice a new field called HEADER IMAGE with an icon, right below the Customize button, as shown below:
You can select/upload any image, leave it without one, but just make sure the selected image is large enough. If you have a uploaded image too large even for a header, you can always pick a size option (original, large, medium, small and thumbnail) so your post won't take too much time to be loaded in someone's browser.
Posts with this new feature will look like this (pictures taken from 2 basic themes, standard and standard 2015):
In case you have a different theme, please take a look @ PostView.ascx source-code from the themes mentioned above so you can modify yours as well.
By using this modified version of the blogengine 3.3.5, you will have to wait when a new official version comes out before updating it. If you do so from the dashboard, the files will be replaced and you will lose the cool features.
And this is it for now! Enjoy...