Posts

Showing posts with the label Dynamic Views

Add whatsapp sharing to my Dynamic Views template

The Dynamic Views template uses a different rendering engine than other templates, handled on the client. For people using Contempo, Soho, Emporio or Notable, you can follow the instructions for the new templates  - this article covers Dynamic Views. Adding whatsapp for Dynamic views involves overriding the template used for sharing. Head to Theme -> Edit HTML Go to the very bottom of the page Copy and add the following script, above the existing one. Update the existing initialization script to include compliation of the sharing script's template contents. Sharing template override <script id='sharing' type='text/json'> {template:Sharing} <div class='share-controls {block:defer}defer{/block:defer} {block:delay}delay{/block:delay}' data-defer='{defer}' data-delay='{delay}'> {block:IfNotdisable-plusone}{SharePlusOne}{/block:IfNotdisable-plusone} {block:IfNotdisable-twitter}{ShareTwitter}{/block:IfN...

Change the width of the Sidebar in Dynamic Views

Image
The default width of the sidebar truncates longer post titles, so it's good to be able to increase the size. Change the width custom CSS Custom CSS can be added to your blog under Template  => Customise => Advanced => Add CSS. Dialog for adding custom CSS to your blog In this dialog, add the following styles. .sidebar #sidebar { width: 380px; } .sidebar #content { margin-left: 380px; } Custom CSS for making the Dynamic Views sidebar wider. Adjust the value to the size you want. Happy Blogging!

Disable particular views in Dynamic Views Blogs

Image
Or: So, how do I hide some views from the dropdown in Dynamic Views blogs? Dynamic Views templates on Blogger are rendered client-side and designed to allow the user to select the way in which they want to view the blog. Some views are more appropriate than others though, so it would be good if there was a setting for which views to enable. Alas, we can hack in a little workaround in a couple of ways. Hide menu items with custom CSS Custom CSS can be added to your blog under Template  => Customise => Advanced => Add CSS. Dialog for adding custom CSS to your blog In this dialog, add a display: none!important; style for any items you want to hide. li.Magazine { display: none!important; } Custom CSS for hiding the 'Magazine' view menu item. Comma separate the li.ItemName CSS selectors for all the items you want; the class names all match the text of the menu item. Hide menu items with template CSS The alternative option is to paste the ...

Make Dynamic Views use the width from the Template Editor

Image
Dynamic Views is little bit different to the other Blog templates on Blogger. It renders all of the posts client-side, with a variety of views. But, there's no easy way to adjust the width of a Dynamic Views Blog, as it doesn't respond to the value selected in the GUI editor. Blogger's template designer makes it easy to trial different widths. Too bad this doesn't work on Dynamic Views :( The reason that it doesn't work is that the javascript for Dynamic Views clears out all the existing <style> from the <head> element of the page when a view is loaded. So even though the <b:template-skin>  element propagates the content.width  variable into the css, it's wiped away before Dynamic Views even gets started. Unless... Actually, there is one case in which it doesn't wipe the <style> tags - when they have a class of "singleton-element" . This is how we're going to propagate the content.width variable. S...

Add a Page to my Dynamic Views Blog

Image
Or: So, How do I add a link to the navbar in my Dynamic Views Blog The Pages concept changed a while ago in Blogger, and now it's not necessarily straight-foward to add a Page to your links section. The instructions  here  cover it for the most part, but it's a little out of date, so here's a quick re-cap on the two major use-cases, when you're using a Dynamic Views Blog. Step 0: Adding a Pages Widget You can't even add your pages to a Pages Widget until you've got one in your Blog. Unlike most of the Blogger templates, a lot of the rendering for the Dynamic Views Blogs is done client-side, so there's much less control for which sections and widgets are displayed. However, the Dynamic Views blogs do use the Pages Widget to determine whether to show all the View configurations in the nav-bar, or whether to compress the views into a dropdown and show the Pages links. Notice that there's really only the one section visible? Hit 'Add a Gadg...