path

Events happening in the community are now at Drupal community events on www.drupal.org.

Detectar entidad por url

Posted by grone2013 on August 30, 2016 at 10:02pm

Saludos compañeros y de antemano gracias por la ayuda.

Con la función arg() puedo hacer ciertas consideraciones sobre las rutas en drupal y hasta determinar el tipo de entidad.

¿Drupal tiene alguna función que al ingresar la url detecte de forma directa el tipo de entidad?

Gracias

Read more

Rest Service path

Posted by Chris87 on January 22, 2015 at 4:34pm

Hi,
I have been playing with the Services module for a couple of days. According to REST API best practices, the GET URL paths I want to use are:
/buildings
/buildings/4
/buildings/4/rooms
/buildings/4/rooms/5

'Building' and 'room' are both content types, and '4' and '5', the node-ids.

Using the Services module, I can create the following calls:
/node/type=building
/node/4

And with the Services Views module, I can customise the path a little more:
/buildings

But the only way to get a specific building is by:
/buildings?nid=4

Read more
2 comments Categories: , , ,

Obligar a usuarios a logearse cuando acceden a ciertos paths

Posted by ssoulless on March 11, 2014 at 1:11am

Hola, necesito ayuda configurando lo siguiente. Porfavor antes de continuar leyendo, miren la siguiente web: http://www.quebuenacompra.com/

Una vez acceden el sitio web les obliga a registrarse o iniciar sesión antes de poder navegar. Yo necesito esto pero por ejemplo al acceder a un path o paths específicos. Ejemplo:

que solo aparezca en los paths
proyectos
proyectos/*

Read more
7 comments Categories: , , ,

Alias automático en vistas filtradas por argumentos?

Posted by carcheky on February 18, 2013 at 10:59am

Saludos, estoy peleándome con rules de nuevo, les planteo mi duda:

Tengo una vista, que me muestra productos de una tienda usando como argumento el id del producto, generando una vista final con la url "producto/34" (o un número cualquiera).

Ahora, me gustaría que rules agregase un alias cuando añado un producto, sustituyendo la dirección con argumento de la vista "producto/[ID]" por "producto/[title]", previamente transliterado.

La opción de que el argumento sea directamente el title no funciona, la vista sólo se puede hacer con argumento ID, y se trata de una entidad.

Read more
5 comments Categories: , , , ,

D7, Bartik - how to swap logo and main header colour depending on URL or path?

Posted by spessex on November 7, 2012 at 2:16pm

Hi all

Does anyone know if there's an easy way (or even just a way!) of changing the logo and main header colour depending on the URL/path (I'm using the Bartik theme for D7)? For example on http://www.cerebraluk.com/ I would like it for instance to change to a different logo and green main header when I click on 'market research services'. Similarly, it would change to other different logos/colour headings when clicking on other main navigation areas.

Any help or advice would be greatly appreciated.

Thank you

Stephen

Read more

Views - forçar path no menu

Posted by pirex360 on May 31, 2012 at 4:10pm

Boa Tarde,

Antes demais, queria agradecer a esta comunidade pois tem sido de uma extrema ajuda neste CMS que é o Drupal. Eu desconhecia este grupo Português e tentava resolver as minhas questões sempre noutros grupos. Em suma, quero agradecer a todos que contribuem.

Em relação ao meu problema, estou com um Drupal 6, tenho uma view que gera path automático, ou seja... tenho uma view que gera um url mediante o nome de uma galeria de imagens.
exemplo: tenho uma galeria de imagem com o nome "toni", automaticamente a view gera o url galerias/toni.

Read more
2 comments Categories: , , ,

Getting drush to work on my MacBook Pro...

Posted by benzeene on July 13, 2011 at 12:10am

I had the pleasure of being introduced to drush at this past meetup, and wanted to provide some detail that might serve someone else.

I run a MacBook Pro, and MAMP as a local development server.

I followed Mike's recommendation of using a path alias to the actual drush directory, so that it would be accessible from Terminal:

I placed the uncompressed drush directory in:
/Users/ben/Applications/
and ran the alias script, following Mike's recommended course of action:

"3. (Optional, but recommended:) To ease the use of drush,

Read more

Panel 3, URL Path, NID,

Posted by sticky2010 on March 20, 2011 at 10:27pm

I have created a view with NID as arguments that pull all contents (fields) of a particular Content Type, say 'cars' (Car is a Content Type).

My panel 3 page works fine. The PATH on panel page is: cars/test/%layout

When I test my panel page in a broswer by typing: mydomain.com/cars/test/36 -> 36 is the Node ID of a particular car - this works perfect, shows details about this particular car with Node ID 36

My question is:

Read more

Path prefix 'm' for mobile version of a drupal site.

Posted by valkum on November 9, 2010 at 7:04pm

For a project of mine, I'm looking for a solution to the following problem. I want to show for a path prefix, a mobile version of my site. So if someone calls http://www.mysite.de/m/ he will see the mobile portal. On http://www.mysite.de/ he will see the normal site. Unfortunately I have not found any possibility to create own path prefixes.

Do you have any ideas?

Read more
4 comments Categories: , ,

Reducing drupal_lookup_path execution times?

Posted by yarco on September 8, 2010 at 3:21am

After installing memcache and boost, i'm thinking that drupal could go fast then.
But it is not.
I'm then reading the querylog for one page. It is about 356 queries and 216.52 ms. drupal_lookup_path spent almost 1/2 queries ( it is 159 queries) and 1/4 more times ( avg. 0.4 * 159 = 64 ms).

There are already someone talked about it with cache. (Yes, they could hack into path.inc and cache them...i forgot the url they talked in drupal).
And i have another way (still need hack path.inc), cause i found a lot of drupal_lookup_path are really needless. for example:

Read more
9 comments Categories: ,
Subscribe with RSS Syndicate content

AltStyle によって変換されたページ (->オリジナル) /