I'm trying to make a view of my new products using the Content: Nid contextual filter.

In this filter I opted to provide a default value, with a type of "Fixed value". On the "Fixed value" field, only 27 values are added, after which no more are accepted.

Apart from the character limit for the text field, is there another reason I can't add more values here? If not, how do I increase the character limit so I can add all the values I wish to?

enter image description here

  • 3
    Hi alok, I rewrote the question in an attempt to make it a bit clearer and hopefully more useful to future visitors. In that spirit I've taken a bit of a leap, and assumed that you realise that the physical reason you can't add any more values is because of a character limit set on the HTML input element. I've also assumed that what you're really interested in is removing that limit if it's safe to do so. I hope that still captures the original intent of your question, but please let me know if it doesn't and we'll sort it out. Thanks
    – Clive
    Aug 25 '19 at 19:09

Why don't you write a small code snippet and pass contextual filters using hook_views_pre_view(), that allows altering a view at the very beginning of processing a preview.

function MODULE_NAME_views_pre_view(&$view, &$display_id, &$args) {
  if ($view->name == 'YOUR_VIEW_MACHINE_NAME' && $display_id == 'page_1') {
    $nids= get_nids(); //write a custom function to get nids.
    $args[] = implode('+', $nids);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.