links

Re:

  1. freelance writer

Fix for Add Preious/Next Link

  1. <h3>mytheme_preprocess_node(){}</h3>
  2. <?php
  3. function myTheme_preprocess_node(&$vars, $hook) {
  4.   switch($vars['node']->type){
  5.     case 'nodeType':
  6.       if($vars['node']->body) {
  7.       $resultn =

Add Preious/Next Link

  1. <h3>mytheme_preprocess_node(){}</h3>
  2. <?php
  3. function myTheme_preprocess_node(&$vars, $hook) {
  4.   switch($vars['node']->type){
  5.     case 'nodeType':
  6.       if($vars['node']->body) {
  7.       $resultn =

Open any link in new tab

  1. if (Drupal.jsEnabled) {
  2. $("a.yourlinkclass").each(function() {
  3.   if(this.href.indexOf(location.hostname) == -1) {
  4.     $(this).click(function(){window.open(this.href);return false;});
  5.   }
  6. });
  7. }

Is there a better way of returning the active menu in primary links?

  1. /*
  2.  * Current active primary link
  3.  */
  4. function return_active_primary_link() {
  5.     $primary_links =  menu_primary_links();
  6.     foreach ($primary_links as $key => $value) {

Fix for Open external links in new window

  1. $(document).ready(function() {
  2.   $("a[href^='http://']").click(function() { window.open($(this).href); return false; });
  3. });

Open external links in new window

  1. $(document).ready() {
  2.   $("a[href^='http://']").click(function() { window.open($(this).href); return false; });
  3. }
Syndicate content