How to set number of pager links visible? - drupal-7

How to set number of pager links visible in custom query?
This code returns 9 links, but I want only 5.
$query = $query->extend('PagerDefault');

I already know:
It's possible set this in theme_pager().

Related

Change the number of items/products per page in broadleaf

Where can I change the number of items listed per page? I saw that the default was 15 and ran into a post (here) stating that it is customizable and referenced as pageSize, but I have no clue where to change its value from.
I would like to increase it when listing products from a certain category or for the search page.
Thanks in advance.
This is controlled by 2 properties within Broadleaf:
web.defaultPageSize=15
web.maxPageSize=100
The web.defaultPageSize is what is restricting it to 15. This is currently set in site/src/main/resources/common.properties and api/src/main/resources/common.properties so making an update to those files should let you change this.

How do I display a message when no results are found in drupal 7 views

I'm global:php to display data in my views page. In case there is no data's in view that time its showing empty screen. But i want to display "no match forund" instead of empty screen.
Please make sure you have the 'Views PHP' module enabled in order to use Global:PHP.

DNN DDRMenu: How to use Token [DEPTH]

I am creating a menu using ULTOKENS in DNN. I want to check the depth of the page so that it only displays the child pages of the current page the user is in. Is it possible to check the Depth of the page using the [DEPTH] TOKEN and how do I go about doing it? Thanks.
[>NODE-TOP]
[?BREADCRUMB]
[?ENABLED]
[/?]
[?NODE]
[?DEPTH] = 2
[*>NODE-TIERONE]
[/?]
[?DEPTH] = 3
[*>NODE-TIERTWO]
[/?]
[/?]
[/?]
[/>]
You use NodeSelector to determine which pages are displayed. For example, NodeSelector="RootChildren" displays children of the currently selected root menu item. Thare are many other ways tomselect pages. See the DNN Wiki at dnnsoftware.com.

Drupal 7 Taxonomy Multiselect box size

I have couple of taxonomies that have few hundred terms in. A content type has multiple of these taxonomy multiselect boxes.
Problem is, that select box size is about 5 (so it shows only 5 at the time). How can i increase the size? Because now treelike use is impossible, because you won't see parent after you've scrolled a bit back.
The problem is in the admin / editor view, and are not related to end-user.
If it's really about the height of that select box, why don't you add it via CSS?
#your-form-id .form-select[multiple] {
height: 300px;
}
Alternatively, implement hook_form_alter in your module:
<?php
function YOURMODULE_form_alter(&$form, &$form_state, $form_id) {
$form['YOURFIELD']['#size'] = 30;
}
?>
Have you tried any of these?
https://drupal.org/project/term_reference_tree
https://drupal.org/project/hierarchical_select
https://drupal.org/project/multiselect
edit - ah ok I'll explain:
OP asked a question about changing sizes of select boxes because there were hundreds of options available and hinted at hierarchy issues in their post. The above modules provide more rich interfaces for users to select multiple options, hence why I listed them. I shall explain more next time soz!

show no result for default value of exposed filters

I want to hide any results which are shown if filter is set to default value ,
is it possible to show no results or to make filter inactive if "-ANY-" is selected?
Or even better not to include this filter in searching result.
You can go to advanced settings of the view and set exposed form settings to input required. Then you users will need to choose at least 1 value in filters to see view results.
I know its late, but for D7, here you have the settings inbuild.
http://drupal.org/node/358546#comment-7355100

Resources