D
D
DenimTornado2012-11-13 21:34:14
Drupal
DenimTornado, 2012-11-13 21:34:14

Help setting block visibility in D7?

There is a catalog on Ubercart + Taxonomy. Pages look like /store/groupname . The task is to display a block with a description of the term only on the first page of the catalog, that is, /store/group_name. On any other variants of the page address, the block does not need to be shown. That is, there should not be a block here /store/group_name/1 and here /store/group_name?id=1 .

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Sobolev, 2012-11-14
@DenimTornado

In the block settings, "If the entered PHP code returns a value":

<?php

$arg = explode('/', drupal_get_path_alias());
$q = $_GET;
unset($q['q']);

if ($arg[0] == 'store' && count($arg) ==2 && empty($q))
  return true;
else
  return false;

?>

I think you get the idea :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question