Detectar entidad por url
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 moreRest Service path
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
Obligar a usuarios a logearse cuando acceden a ciertos paths
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/*
Alias automático en vistas filtradas por argumentos?
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 moreD7, Bartik - how to swap logo and main header colour depending on URL or path?
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 moreViews - forçar path no menu
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.
Getting drush to work on my MacBook Pro...
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 morePanel 3, URL Path, NID,
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 morePath prefix 'm' for mobile version of a drupal site.
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 moreReducing drupal_lookup_path execution times?
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:



