#views

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
ludo1960's picture

Sort view before print

Hello

Got as far as running a query grabbing a bunch of nids and passing them to a view, thought I was doing well! However you guessed it, the sort order is wrong, here's my pseudo code:

//query to grab the nids

if (!empty($nodeids)) {
$view='taxo_listing';
foreach ($nodeids as $nid){
print views_embed_view($view, block_1, $nid);
}

What I need to do is pre-build the view then run views_query_alter to sort the view before printing out the view.

Read more
torotil's picture

Select nodes by complex taxonomy expressions

For a client I'm working on module that allows to display a taxonomy based selection of nodes (as a view) in another node's content. This is accomplished in three steps:

  1. a field that can be attached to a node. For now it allows to store a taxonomy selection like: (tid1 AND tid2 AND …) OR (tid3 AND …) OR …
  2. a views argument handler for nodes that filters nodes by a tid expression like: (IN(t1,t2,…) AND IN(t3,t4,…) AND …) OR (IN(t5,…) AND …) OR …
  3. a field formatter that uses the selection of 1. to feed it into a views argument from 2.
Read more
pena2's picture

duda, Views y URL

Buen dia jovenes. Soy medio nuevo en Drupal, llevo poco y medio entendiendo poco a poco.
Fui a la drupalada la vez pasada q se hablo de la factura electronica.

Pues les cuento mi actual duda..
tengo un View que muestra los nodos de la fecha (y categoria/taxonomia) señalados en el URL, algo asi:
dominio.com/archivo/20110909
dominio.com/archivo/20110909/termname
y tengo un template page-archivo.tpl.php para mostrarlo.

Pues me piden que si los URLs pudieran ser mejor asi, sin el "/archivo":
dominio.com/20110909
dominio.com/20110909/categoria

Read more
tigreton's picture

Usar cck?

Lo primero hola que soy nuevo. Me he metido en el mundillo de drupal ahora en serio, ya que antes lo seguia(cuando joomla era lo más) y me gustaba, pero ahora estoy aquí y vengo para quedarme.

El título no es todo lo correcto que debería ser, ya que no se muy bien que debo usar, os explico lo que tengo que hacer:

Haciendo una página para una empresa de ebanisteria(mas bien soy el maquetador, pero bueno) los clientes tienen que subir productos. No habría mas problema que crear un content type con sus campos: título, ficha e imagen. Eso está hecho.

Read more
prajila.v.p's picture

Add one field to hook__views_data()

hiii
i am trying to develop a drupal module which wants a default view. Already there is a group called test which contain 2 fields. i want to add one more field to that group from my module. I tried this code. but it gives an array field and structure broken .

function myhook_views_data() {
$data['test']['table']['group'] = t('test');
$data['test']['table']['base'] = array(
'field' => 'view_name',
'title' => t('test data'),
'help' => t("test data help."),
'weight' => -10,
);
return $data;
}
how can i do this?? Pls help me

Read more
Subscribe with RSS Syndicate content