How To Show Facets On Non-Search Page As Normal Widget Instead Of List

Show facets on non-search page

Facets allow users to search the site based on selected criteria. Using Facet API module we can add facets on site. For each field that is indexed, we can have facets. These facets can be configured and displayed on search pages. We have various configuration options available for this.

Many times we need to show these facets on pages that are not Search pages. Facet API module does provide this functionality. You need to create a view display of type “Facet blocks”. Below are the steps to do so.

1 – Create a view of search index and a display of type “Facets Block”. You can make this display in the same view as the search page.

2 – Configure “Facet field” and “Search page path”. Search page path is the path of the search page.

The block is then available to be assigned to the region in blocks page.

However, there are several limitations to this:

  1. The facet links will always be styled as a list, no rewrite or format selection is possible.
  2. It is also not possible to use the normal Facet API widgets for these facets. This is because re-using the Facet API components from outside of the Facet API cannot be easily achieved.

In many cases, Professional Web Development need to show facets on the non-search pages as normal facets instead of the list. To achieve this, follow steps below:

  1. Create a facet block as mentioned above.
  2. Show this block on the non-search page as usual.
  3. Make sure that facets blocks are displaying on non-search page as well. Also, make sure that facet block is showing above views facets blocks i.e weight of facets block is higher than the views facets block.
  4. Edit the facet block and set “Display for searches of facets” to “All search page”.

Doing this will make both the blocks visible on the non-search page. You can hide the block showing list using CSS. This solution works for Search API Database Search and Search API Solr Search.

The final result is something like this:

Read more Blogs https://goo.gl/jhRmqR

Create Sliders To Move In Opposite Direction With Each Other

This is a custom animated slider with left & right offset slide effect. Animated effect like opening/closing door effects.
This slider can be used in testimonial, display 2 items in a slide, simple content & image slider and more.
Feature
  • Support in responsive view, tablet & mobile views
  • Support fluid responsive width
  • Content & images can slide
  • Compatible with IE 9 and higher
  • No need to add other dependences of CSS/JS
  • jQuery library: 1.4 and higher
  • Easy to use
HTML: Please use below HTML code:
<div class="aws-slider">
  <div class="aws-controls">
    <a class="aws-prev-link hide-arrow" href="javascript:void();"> 
        <img src="image-path"> <!-- prev icon -->
     </a>
    <a class="aws-next-link" href="javascript:void();”>
        <img src="image-path"> <!-- Next icon -->
    </a>
  </div> <!-- /.aws-controls -->
  <div class="aws-grid">
    <!-- Slide content wrapper div -->
    <div class="aws-row aws-row-1">
      <div class="aws-col aws-col-1">
        <div class="aws-content">
          <div class="aws-title">Title</div>
          <div class="aws-body">Informative text</div>
        </div>
      </div> <!-- /.aws-col -->
      <div class="aws-col aws-col-2">
        <div class="aws-content">
          <div class="aws-title">Title</div>
          <div class="aws-body">Informative text</div>
        </div> 
      </div> <!-- /.aws-col -->
    </div> <!-- /.aws-row -->
    ...
    ...
  </div> <!-- /.aws-grid -->
</div> <!-- /.aws-slider -->
JS: Use below code for animation effect for desktop and mobile device.
jQuery(document).ready(function() {
  var window_width = jQuery(window).width();

  jQuery('.aws-controls .aws-prev-link').addClass('hide-arrow');
  
  // Animate slide for Desktop & Mobile
  slider_desktop ();
  slider_mobile ();

  jQuery(window).resize(function() {
    window_width = jQuery(window).width();
    if (window_width > 767) {
      jQuery('.aws-slider .aws-row.active .aws-col').removeClass('active');

      // Resize
      jQuery('.aws-slider').css('height', 'auto');
      jQuery('.aws-slider .aws-row .aws-col').css('height', 'auto');
      var aws_col_h_max = 0;
      jQuery('.aws-slider .aws-row').each(function() {
        var awscolHeight = jQuery(this).outerHeight();
        if (awscolHeight > aws_col_h_max) {
          aws_col_h_max = awscolHeight;
        }
      });
      jQuery('.aws-slider').css('height', aws_col_h_max);
      jQuery('.aws-slider .aws-row .aws-col').css('height', aws_col_h_max);
      // Resize End
    }
    else if (window_width < 768) {
      //slider_mobile (window_width);
      jQuery('.aws-slider .aws-row.active .aws-col-1').addClass('active');

      // Resize
      jQuery('.aws-slider').css('height', 'auto');
      jQuery('.aws-slider .aws-row .aws-col').css('height', 'auto');
      var aws_col_h_max = 0;
      jQuery('.aws-slider .aws-row').each(function() {
        var awscolHeight = jQuery(this).children('.aws-col').outerHeight();
        if (awscolHeight > aws_col_h_max) {
          aws_col_h_max = awscolHeight;
        }
      });
      jQuery('.aws-slider').css('height', aws_col_h_max);
      jQuery('.aws-slider .aws-row .aws-col').css('height', aws_col_h_max);
      // Resize End
    }
  });
  // End

  // Set height for Col FOR DESKTOP
  if (jQuery(window).width() > 767) {
    var aws_col_h_max = 0;
    jQuery('.aws-slider .aws-row').each(function() {
      var awscolHeight = jQuery(this).outerHeight();
      if (awscolHeight > aws_col_h_max) {
        aws_col_h_max = awscolHeight;
      }
    });
    jQuery('.aws-slider').css('height', aws_col_h_max);
    jQuery('.aws-slider .aws-row .aws-col').css('height', aws_col_h_max);
  }

  // Set height for Col FOR MOBILE
  if (window_width < 768) {
    var aws_col_h_max = 0;
    jQuery('.aws-slider .aws-row').each(function() {
      var awscolHeight = jQuery(this).children('.aws-col').outerHeight();
      if (awscolHeight > aws_col_h_max) {
        aws_col_h_max = awscolHeight;
      }
    });
    jQuery('.aws-slider').css('height', aws_col_h_max);
    jQuery('.aws-slider .aws-row .aws-col').css('height', aws_col_h_max);
  }
});

// For Desktop
function slider_desktop () {
  jQuery('.aws-slider .aws-row:nth-child(1)').addClass('active');
  // For Prev
  jQuery('.aws-controls .aws-prev-link').click(function() {
    window_width = jQuery(window).width();
    if (window_width > 767) {
      if (jQuery('.aws-slider .aws-row.active').is(':first-child')) {
        // To detect first row
      }
      else if (jQuery('.aws-slider .aws-row:nth-child(2)').hasClass('active')) {
        jQuery('.aws-controls .aws-prev-link').addClass('hide-arrow');
        jQuery('.aws-slider .aws-row.active').removeClass('active').prev().addClass('active');
      }
      else {
        jQuery('.aws-controls .aws-prev-link').removeClass('hide-arrow');
        jQuery('.aws-controls .aws-next-link').removeClass('hide-arrow');
        jQuery('.aws-slider .aws-row.active').removeClass('active').prev().addClass('active');
      }
    }
  });
  // For Next
  jQuery('.aws-controls .aws-next-link').click(function() {
    window_width = jQuery(window).width();
    if (window_width > 767) {
      if (jQuery('.aws-slider .aws-row:nth-last-child(1)').hasClass('active')) {
        // To detect last row
      }
      else if (jQuery('.aws-slider .aws-row:nth-last-child(2)').hasClass('active')) {
        jQuery('.aws-controls .aws-next-link').addClass('hide-arrow');
        jQuery('.aws-slider .aws-row.active').removeClass('active').next().addClass('active');
      }
      else {
        jQuery('.aws-controls .aws-prev-link').removeClass('hide-arrow');
        jQuery('.aws-slider .aws-row.active').removeClass('active').next().addClass('active');
      }
    }
  });
}
// For Mobile
function slider_mobile () {
  jQuery('.aws-slider .aws-row:nth-child(1)').addClass('active');
  jQuery('.aws-slider .aws-row:nth-child(1) .aws-col-1').addClass('active');
  // For Prev
  jQuery('.aws-controls .aws-prev-link').click(function() {
    window_width = jQuery(window).width();
    if (window_width < 768) {
      jQuery('.aws-controls .aws-next-link').removeClass('hide-arrow');
      if (jQuery('.aws-slider .aws-row .aws-col-2.active').hasClass('active')) {
        jQuery('.aws-slider .aws-row .aws-col.active').removeClass('active').prev().addClass('active');
        if (jQuery('.aws-slider .aws-row:first-child').hasClass('active')) {
          jQuery('.aws-controls .aws-prev-link').addClass('hide-arrow');
        }
      }
      else if (jQuery('.aws-slider .aws-row .aws-col-1.active').hasClass('active')) {
        if (jQuery('.aws-slider .aws-row:first-child').hasClass('active')) {
          jQuery('.aws-slider .aws-row:first-child').addClass('active');
        }
        else {
          jQuery('.aws-slider .aws-row .aws-col.active').parent('.aws-row').removeClass('active').prev().addClass('active');
          jQuery('.aws-slider .aws-row .aws-col').removeClass('active');
          jQuery('.aws-slider .aws-row.active .aws-col-2').addClass('active');
        }
      }
    }
  });
  // For Next
  jQuery('.aws-controls .aws-next-link').click(function() {
    window_width = jQuery(window).width();
    if (window_width < 768) {
      if (jQuery('.aws-slider .aws-row .aws-col-1.active').hasClass('active')) {
        if(jQuery('.aws-slider .aws-row:last-child .aws-col').length == '2' && jQuery('.aws-slider .aws-row:last-child').hasClass('active')) {
          jQuery('.aws-controls .aws-next-link').addClass('hide-arrow');
        }
        if (jQuery('.aws-slider .aws-row.active .aws-col-2').length) {
          jQuery('.aws-controls .aws-prev-link').removeClass('hide-arrow');
          jQuery('.aws-slider .aws-row .aws-col.active').removeClass('active').next().addClass('active');
        }
      }
      else if (jQuery('.aws-slider .aws-row .aws-col-2.active').hasClass('active')) {
        if (jQuery('.aws-slider .aws-row:last-child .aws-col').length == '1' && jQuery('.aws-slider .aws-row:nth-last-child(2)').hasClass('active')) {
          jQuery('.aws-controls .aws-next-link').addClass('hide-arrow');
        }
        if (jQuery('.aws-slider .aws-row:last-child').hasClass('active')) {
          // To detect last row
        }
        else {
          jQuery('.aws-slider .aws-row .aws-col.active').parent('.aws-row').removeClass('active').next().addClass('active');
          jQuery('.aws-slider .aws-row .aws-col').removeClass('active');
          jQuery('.aws-slider .aws-row.active .aws-col-1').addClass('active');
        }
      }
    }
  });
}
CSS:
.aws-slider .aws-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 99;
  margin: 0 0 0 -30px;
}
.aws-slider .aws-controls a {
  display: inline-block;
  height: 23px;
  width: 30px;
  text-align: center;
}
.aws-slider .aws-controls a.hide-arrow {
  opacity: .3;
}
@media (max-width: 767px) {
  .aws-slider .aws-controls {
    right: 0;
    left: 0;
    width: -webkit-calc('100% - 30px');
    width: -moz-calc('100% - 30px');
    width: calc('100% - 30px');
    margin: 0 15px;
  }
  .aws-slider .aws-controls a.aws-next-link {
    float: right;
  }
}

 

Hope this helped you a lot, feel free to share your feedbacks, Need more assistance regarding Quality Web Design Services Contact us now.
If you want to know how 3D Animation hover effect of images done without using any jQuery code and JS libraries click here

Guide To Develop Laravel Based CMS Using October CMS


Let’s have a quick introduction of October CMS.

October CMS is a free, open source and lightweight Laravel based framework. Father of October CMS is

“Alexey Bobkov” and “Samuel Georges”, a dual-skilled duo in programming and UX design from Canada and Australia.

To build Web applications without any restriction on page structure, HTML, CSS and Design Markup. It provides simple

modern template engine to develop websites with more powerful using collection of simple, powerful, reliable and flexible features.

“Everything should be made as simple as possible, but not simpler” truly said by Albert Einstein, with the Philosophy

completed 3 years of octobercms with their awesome contribution.

Quick facts about OctoberCMS:

  • Easy Administrative interface
  • Ajax features
  • Quick scaffolding
  • Building tools like page components
  • Extensible platform
  • Translatable content using multilingual support
  • For developer most important you can use OctoberCMS without changing your development habits because its easily adopted to any existing workflow and deploy into your control system.

Why we have to use OctoberCMS?

  • Simplistic
  • Modern
  • Universal
  • Extensible
  • Reliable
  • Easy to learn
  • Saves time and their extra features and advantages makes force to use octobercms in as a development.

Minimum System Requirements:

  • PHP version 5.5.9 or higher
  • PDO PHP Extension
  • CURL PHP Extension
  • OpenSSL PHP Extension
  • Mbstring PHP Library
  • ZipArchive PHP Library
  • GD PHP Library

Easy to Start:

Follow below steps to setup your own October CMS Demo:

  • Either clone this repo from GitHub, or download the installer. The recommended way is to download the installer, as it’s simple and quick, and allows you to make some configurations right inside the browser in an easy-to-follow stepwise interface.
  • Extract the files into your desired local directory, and configure your local server to match the local path.
  • Set up a new database, and take note of the database name.
  • Navigate to the install.php file in your browser, follow the instructions on screen, and enter your configuration variables.

Hope this helps you to make things work..!!! Need more assistance regarding web development service…!

Leaflet Map Integration In The Ionic App

Leaflet Map Integration In The Ionic App

Introduction of leaflet map

Leaflet is a open source javascript library for mobile friendly interactive maps it has most mapping feature that developer had needed.
We can also use leaflet map in websites. Here I will show you how to develop ionic app with the integration of leaflet map.I have used leaflet map in ionic application for finding location, know nearby information and using GPS we find route and location.

Installing all the leaflet libraries using bower

  • Install map only: For installing map first you will update your bower and install leaflet libraries using below mentioned command

bower install leaflet

Note: Import three files leaflet css and js in your index.html file

<link rel=”stylesheet” href=”lib/leaflet/dist/leaflet.css” />         http://lib/leaflet/dist/leaflet.js          http://lib/angular-leaflet-directive/dist/angular-leaflet-directive.js

home.html

<ion-content> <leaflet width=”100%” height=”100%”></leaflet> </ion-content>

Put the center point in your map using Latitude ,Longitude and Zoom.

home.controller.js

angular.extend ($scope,{         ahmedabad:{ lat: 23.0225, lng: 72.5714, zoom: 8 } });

home.html

<ion-content> <leaflet if-center=”ahmedabad”  height=”100%” width=”100%”></leaflet> </ion-content>

  • For marker / custom marker: In map we can put simple marker with message and focus etc..

First we creating simple array for marker.

var mymarker={ lat :23.02850605221088, lng: 72.55897879600525, focus : true, message: ‘Addweb Solution Pvt. Ltd.’ }; angular.extend ($scope,{ Ahmedabad:{ lat: 23.0225, lng: 72.5714, zoom: 8 }, markers : { mymarker :angular.copy(mymarker) } });

home.html

<ion-content> <leaflet if-center=”ahmedabad” markers=”markers” height=”100%” width=”100%”></leaflet> </ion-content>

Here, we put one object (markers) in the map and angular.extend  is extend the object in $scope and we use that object direct to the leaflet tag.

  • Creating custom marker icon in Map

For Creating custom marker in leaflet map first we install Leaflet.MakiMarkers libraries using this command

bower install Leaflet.MakiMarkers

index.html

http://lib/Leaflet.MakiMarkers/Leaflet.MakiMarkers.js http://lib/angular-leaflet-directive/dist/angular-leaflet-directive.js

Note: Put this file below the leaflet.js and also import angular-leaflet-directive.js
Read more… https://goo.gl/7nrcu2
  

Hope this blog helps you and would help to resolve any leaflet map integration in Ionic Application. Share you views and feedback 🙂 . To be the Part of the family as Ionic Developer visit Hire Ionic developer .

How Filter Works In WordPress

Filter Hooks are very powerful features of WordPress that provide huge amount of flexibility for modifying WordPress, including custom themes and plugins. In this tutorial, I’m just showing a simple example that demonstrates what a filter hook does.
There are four core functions that use when working with filters:
  • add_filter(): Used for adding new custom filter.
  • remove_filter(): used for removing an already registered filter.
  • apply_filters(): runs the provided data through the specified filter.
  • has_filter(): checks whether a specific filter has been registered or not.
You can think of a filter as a method for modifying data. Here an example for following colors:
function demo_show_colors() {    
    $colors = array('Red', 'Green', 'Blue');
    $list = '<ul>';
    foreach($colors as $color) {
     $list .= '<li>' . $color . '</li>';
    }
    $list .= '</ul>';
    return $list;    
}
echo demo_show_colors();
Output:
* Red
* Green
* Blue
Now if we want to modify list of colors via plugin, we need to include a filter.
function demo_show_colors() {
    $colors = array('Red', 'Green', 'Blue');
    $list = '<ul>';
    if(has_filter('modify_colors')){
     $colors = apply_filters('modify_colors', $colors);
    }
    foreach($colors as $color) {
     $list .= '<li>' . $color . '</li>';
    }
    $list .= '</ul>';
    return $list;    
}
In if condition we check if there “modify_colors” filter exists then apply that filter to $color array.
After applying filter we can add colors, remove selective colors, change color name etc.
Here’s Example For Add Color:
function add_extra_color($colors) 
{
    $extra_color = array('Navy', 'Skyblue', 'Brown');
    $colors = array_merge($extra_color, $colors);
    return $colors;
}
add_filter('modify_colors', 'add_extra_color');
Output:
* Red
* Green
* Blue
* Navy
* Skyblue
* Brown
remove_filter is used for just remove addition done by the add_filter() if any.
Here is example of remove filter:
function add_extra_color($colors) 
{
 $extra_color = array('Navy','Skyblue','Brown');
 $colors = array_merge($extra_color, $colors);
 return $colors;
}
add_filter('modify_colors', 'add_extra_color')

function demo_show_colors() 
{
 $colors = array('Red','Green','Blue');
 $list = '<ul>';
 if(has_filter('modify_colors')){
     $colors = apply_filters('modify_colors', $colors);
 }
 foreach($colors as $color) {
     $list .= '<li>' . $color . '</li>';
 }
 $list .= '</ul>';
 return $list;    
}

remove_filter('modify_colors','add_extra_color');
Output:
* Red
* Green
* Blue
Hope you all understood the concept of Filters in WordPress. Feel free to contact us for any suggestions/queries and hire WordPress developer.
Read More…. https://goo.gl/wt9svz

How to Use External Invite for User in Drupal 7?

Imagine a scenario where you need to invite some of site users to accept some role on the site. You do not want to go and edit every such users and assign them said role. You also want leave the choice with users if they want to new role on site or not.
Enters User External Invite module.
This module allows users with proper permission to invite other users. Users have specified time before the invite expires. Inviting users also have option to cancel invite and resent invites
Below is step is step guide to install and use this module.
1 – Download the module and install as usual.
Download the module from here: http://drupal.org/project/user_external_invite and install as usual.
2 – Configuration
Go to “admin/people/permissions” and set permission for required roles to send invite.
Go to admin/config/people/invite and set configurations as required.
Select which user roles can be invited, default role, expiration times and templates.
You can customise the emails that will be sent on various occasions here as well.
3 – Invite users
To invite users go to admin/people/invite and add address you want to invite.
You can select role for which invite is being sent. You can also add custom message. This message will be added in email that is being sent to invited users.
4 – Manage Invites
You can manage invites from admin/people/invite/operations.
On this page, you can see list of all invites that are sent and status of each invite. From this page you can either cancel an invite or resent the invite.
The module also implements various checks such as you can not disable module till you have pending invites, making sure that roles are not changed when invites are pending for that role etc.
The module also provides a hook which can be used in case inviting email id is not present in the system.
Hope this article has helped you. Need more assistance regarding drupal development services..!

How Autocomplete Done In Angularjs Using Directive And Factory

The Autocomplete textbox is used for providing a suggestion when we are typing into the input box (text field). You notice when we typing in the Google search, that is called Autocomplete. It is mostly used for instant search from the predefined or AJAX based listing.

Use of filters is also known part in Angularjs. Filters are used for filtering the data based on passed argument. Filters are used in template files in angularjs. In filters, we can use expressions as well. And we are going to use all these for getting the autocomplete functionality.
Example of filters in template file is,
Ex.(ng-repeat=”i in items | filtersearch:searchString”).
Here, filtersearch is a name of filter and ‘searchString’ is arguments that it will passed text parameter. Whatever we will put into the Textbox, it will be passed as an array and it will be stored as an elements of an Array.
Note: Here you also need to supply ‘searchString’ this as your ng-model name for input search box in web development service.
Let me walk you through how to create Autocomplete textfield 
1. Make a Simple form to create autocomplete textfield
Create a one input textfield, give a ng-change event in this text field
And give one ng-model name for this text field,and And Also Create a one select box it would be ‘multiple’ also give ng-style  because whenever user selects text from the list then selected item will be copied in the text box and we also need to hide the list.
<div>
<input type="text" ng-model="searchString"  ng-change="searching()" ng-keydown="changecursor($event)" id="input" autofocus><br>
<select id="select" ng-style="vis" ng-model="txt" ng-click="copy($event)" ng-keypress="copy($event)" ng-keydown="changecursor($event)” multiple>
<option ng-repeat="i in items | filtersearch:searchString">{{i.string}}</option>
</select >
</div>
Here, ng-model=”txt” is used for copy text into the text field.

Reaf more https://goo.gl/qrmAI8