Programmatically Change Meta Description Drupal
function themename_html_head_alter(&$head_elements) { $head_elements['metatag_description_0']['#value'] = t('This is my new meta description'); } »
function themename_html_head_alter(&$head_elements) { $head_elements['metatag_description_0']['#value'] = t('This is my new meta description'); } »
I have my issues with the nesting ability within Sass and how it is used in some cases. When I first started using Sass nesting I thought it was the best thing since sliced bread. Using it more and more and over time I started to notice that the code I was writing, through the use of nesting, was starting to become messy and complicated. Nesting is great and on the face of it, it looks like it’s time saving compared to writing normal CSS code. »
If you ever need to add stylesheets based on old IE browsers this can be done via the template.php file with this function: function themename_preprocess_html(&$variables) { // If it's IE8 add this Stylesheet drupal_add_css(path_to_theme() . '/css/ie-lte-8.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE)); } »
I love messing around with Terminal ever since I started to learn that Front End Developer could be done through it (I didn’t really have much use for it before). I think I like it so much because it feels like I’m within the Matrix… bit sad I know but I don’t care. What makes me like it so much are the other things you can do with Terminal. Ping Command »
I love a good Sass mixin and there are some very nice mixins out there to use. One mixin for border radius though, I find is a bit blotted. Other mixins for border radius I’ve found are always split into five different mixins and you have to @include each one. So I written this little mixin to deal with all the values for border radius, including prefixes, all within one call. »
After my previous post for my border radius mixin I thought I would share my must commonly used mixins for projects. First Transition // Transition @mixin transition($time) { -webkit-transition: all $time ease-in-out; -moz-transition: all $time ease-in-out; -o-transition: all $time ease-in-out; transition: all $time ease-in-out; } Transform and Rotate aren’t mixins I commonly use a lot on their own but I use these together to create sashes to overlay images »
A small function which has become a bit of a regular use is Drupal’s Clean CSS Identifier. “Prepares a string for use as a CSS identifier (element, class, or ID name).” drupal_clean_css_identifier($identifier, $filter = array(' ' => '-', '_' => '-', '/' => '-', '[' => '-', ']' => '')); This has become very handy in situations. »
Recently I’ve been working on a project at work, which needed to the use of Jquery Quicksand coupled with Views to bring in and filter content. Each page when being created would be tagged with a Taxonomy Term to help define what the content is related to. The page needed links above the content which printed out each tag dynamically so the user could filter the content using the Jquery Quicksand animation. »
Why hello there. As this is my first post let me tell you a couple of things about myself to kick it off. I’ve been a front end developer (well a proper one anyway) for about 3 years now. I’ve done a little bit of most things to be fair, but seem to have settled into my current job working mainly with Drupal. For about 2 years now I’ve been working for an automotive website provider, building websites in Drupal for used car dealers. »