¿Cómo usar Hierarchical Select?

Hierarchical Select es un módulo que te permite crear campos dependientes de otros, por ejemplo, supongamos que deseamos cargar una lista de paises, después dependiendo del país cargar el estado y dependiendo del estado cargar la ciudad, nuestro ejemplo se vería así:

-México
-- Nuevo León
--- Monterrey
--- San Pedro
-- Coahuila
--- Saltillo
-Estados Unidos
-- Texas
--- San Antonio
--- Houston
-- California
--- Los Angeles
--- San Diego
--- San Francisco

Normalmente al seleccionar un término nos aparece una larga lista de todo el árbol de nuestra taxonomía, algo que puede resultar no ser muy conveniente y práctico si tenemos todos los paises del mundo, con todos los estados y ciudades, la lista sería simplemente enorme y un usuario se perdería buscando el nombre del país o el estado o la ciudad dentro de una lista interminable. Lo más práctico sería que la lista se redujera dinámicamente, eligiendo primero país, después estado y por último ciudad. De esta manera yo solo seleccionaría:

México -> Nuevo León -> Monterrey para llegar a la ciudad de Monterrey.

Esto se puede hacer con Hierarchical Select, sin embargo, por más que me gustaría usar la palabra fácil, tengo que admitir que por alguna razón este módulo resulta complicado de configurar.

Per para eso estoy escribiendo esto, así que empecemos. Después de instalar el módulo con todas las dependencias sin incluir las de CCK (en pocas palabras solo el módulo principal y el módulo para utilizar hierarchical select con views) vamos a configurarlo (para ver una lista de todos los módulos que he instalado yo ve al final de este tutorial).

Lo primero que tenemos que hacer es definir qué vamos a hacer. Vamos a crear una lista de paises, con estados y ciudades, esa lista la vamos a utilizar para categorizar contenido, digamos fotografías, cada fotografía es un nodo y tiene una categorización de en qué país, estado y ciudad se tomó esa fotografía. Después vamos a crear una vista con views para filtrar las fotografías por ciudad. Esto implica que siempre seleccionaremos el último nivel de nuestra categorización, que es la ciudad.

Bien. Lo primero que tenemos que hacer es crear nuestra categorización. Si aún no lo has hecho ve a admin/content/taxonomy para hacerlo, si no sabes cómo hacerlo tal vez este sea el momento para dar un paso atrás y consultar como usar taxonomy.

Después de crear el vocabulario y agregar algunos términos iremos de nuevo a editar nuestro vocabulario para configurar HS. Las opciones para lo que queremos hacer son:

- Hierarchy: Single y Required seleccionado.

Después vamos a seleccionar la casilla de "Use the Hierarchical Select form element for this vocabulary".

En mis opciones establecí:

Save term lineage.
Force the user to choose a term from the deepest level
Display de node count: Disabled

Level labels (Disabled).
Esta opción significa que si el usuario puede escoger digamos que solamente el país y el estado sin estar forzado a elegir la ciudad le aparecerá una etiqueta indicando qué opción está seleccionando, algo muy parecido a País: México, Estado: Nuevo León. Recomiendo deshabilitar esta opción hasta que todo funcione bien.

Dropbox settings (Disabled)
Esta opción es utilizada para permitir la selección de opciones múltiples. En mi caso no se necesita (una fotografía no puede tener dos ubicaciones) sin embargo si se va a utilizar recomiendo primero no utilizarla hasta que todo funcione bien (especialmente con views).

Editability Settings (Disabled)
Esta opción sirve para que el usuario pueda agregar nuevos términos al vocabulario, cosa que no queremos.

Por último grabamos.

Después iremos a Views a crear alguna vista standard, con un filtro de nuestra taxonomía y este filtro deberá de ser expuesto.

Mi filtro está configurado como No opcional, y seleccionado Filter settings default, Force Single y Look Operator.

Si se te pregunta sobre configurar Views para que funcione con Hierarchical Select deberías de hacerlo, esta configuración digamos que es para cada vista y puede ser independiente sin embargo recomiendo que los datos se ajusten uno a uno a la configuración de vocabulario.

Al final recomiendo probar uno por uno los cambios hechos y probar la opción de Dropbox, labels, lineage y level choice. Muy probablemente romperas uno o dos sitios antes de aprender a configurar bien este módulo.

Módulos Instalados
- Hierarchical Select
- HS Select Flat List
- HS Select Menu
- HS Select Taxonomy
- HS Select Taxonomy Views
- Views
- Views UI

Comments

#1

Hola,

como creamos la lista de países, ciudades, ¿se crea con taxonomía? ¿no habrá q introducir los términos (paises,ciudades) uno a uno, no? ¿cómo lo haces?

Gracias

#2

Como indica el tutorial eso se hace con las taxonomias, hago la misma recomendacion que el autor, ehcale un vistazo a los diversos tutoriales de manejo de taxonomias y tipos de contenidos.-

#3

An excellent training program, a healthy diet, and Sport Supplement can help you be in shape and stay in shape so you could constantly give a stand-out performance. How to Use Supplements Effectively | Three Key Of Sports Supplements | Choosing Sports Supplements | Share your content

#4

Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... http://drupal.bozpit.com/?682a40edb418380effac742da82,

#5

tengo la misma duda...donde elijo que cuando elijan tal opcion se mjuestren tales opciones?

#6

Eso lo seleccionas creando las categorias y las subcategorias, creando nuevo vocabulario

#7

Hola, la verdad que me sirvio de mucho este tutoral, logro hacer todo, pero en la vista he inclusive en la configuración aparece un mensaje indicando que tengo javascript deshabilitado en el browsers
El mensaje de error es el siguiente:


You don't have Javascript enabled. Hover for more information! But don't worry: you can still use this web site! You have two options:

* enable Javascript in your browser and then refresh this page, for a much enhanced experience.
* click the Update button every time you want to update the selection.

#8

I rarely meet such interesting ideas! Not long ago I found an interesting documentary by accident at one rapidshare search engine and watched it with interest. You never know where you find and where you lose...

#9

My firefox web browser has some trouble with javascript, so I try your directions to disable Javascript in mozilla firefox. thanks for division this.
Drug Rehab Residential treatment facility California

#10

We lost Lawrence, our big orange kitty, to liver cancer at 11 PM on May 9. He passed away quietly at home and we were with him. 642-373 exam We adopted him from the C/MVSPCA three years ago when he was fourteen. It has been a wonderful three years and we are grateful to have had the opportunity to share that time with him. 70-443 exam Giving a senior cat a second chance at having a home, for however long he can stay on earth, has been a lovely experience.

#11

Big organizations often have complex organigrams. In this demo movie I show how Drupal's taxonomy system could be used to organize content in a hierarchical structure that follows the organigram of a research institute.testking 642-812

Besides of the taxonomy module we used hierachical select, NAT, block visibility code testking 642-825 and a bit of views argument handling code to create a dynamic system that shows content relevant content all through the different branches of the website.testking 642-845

#12

En este ejemplo vamos a usar un control FlexGrid para asignar un Recordset y mostrar los datos directamente.
Por tanto, tendrás que crear un nuevo proyecto de Visual Basic 6.0 y agregar ese componente, el cual se muestra como: Microsoft Hierarchical FlexGrid Control 6.0 (SP4) (OLEDB) y en realidad es el control MSHFLXGD.OCX.220-602 exam

También tendrás que añadir una referencia a la librería de OLEDB, en mi caso he usado Microsoft ActiveX Data Objects 2.8 Library, pero supongo que con otra versión anterior funcionará, pero no lo he 642-873 exam probado, y como esa referencia está disponible después de instalar el SQL Server 2005 Express, pues... ¿para qué complicarnos?70-643 exam

Dependiendo de la forma en que quieras acceder a la base de datos, necesitarás (como es de suponer) una base de datos de SQL Server 2005, por ejemplo la base de datos "pubs".

#13

es algo confuso, soy nuevo en drupal y no logre hacer todo lo que decia el tutorial si es algo complejo

#14

Hello.
Is the information more about this feature somewhere? Above all how to use it in a module?
Thx in advance.
friendship Scraps

#16

Cuando he creado la estructura en hierarquical select, al crear un tipo de contenido, ademas de aparecerme los select dinamicos de estado-provincia-ciudad, me aparece uno con toda la taxonomia cargada. ¿Como puedo quitar eso?

#18

Thanks for sharing this amazing post with code. It will be useful to people looking for such code.
cleveland launcher iron

#19

Hairy Porn Movie | Hairy Bush Pussy | Hairy Bush Is In | Very Hairy Cunts | Hairy Mature Cunts | Hairy Red Bush | Big Tits Hairy Bush | Porn Hairy Pussy | Porn Video Hairy | Free Hairy Cunts | Natural Hairy Bush | Hairy Porn Movies | Black Hairy Bush | Nude Hairy Bush | Hairy Blonde Russian Cunts Pictures | Free Hairy Pussy Porn | Hairy Porn Pics | My Hairy Bush | Hairy Women Porn | Women With Hairy Cunts | Hairy Bush Porn | Mature Hairy Vaginas | redhairybush | young hairy teen porn | hairyblondecunts | Hairy Bush Pic | Red Head Women Hairy Bush | Hairy Bush Teens | Hairy Wet Cunts | Young Hairy Porn | Free Hairy Porn Pics | Free Hairy Porn Movies | Very Big Hairy Bush | Hairy Vaginas Free Photos | Hairy Muff Cunts | hairyporn | Free Young Hairy Porn | Hairy Bush Beavers Fuck | Hairy Blonde Vaginas | Hairy Blonde Cunts Free Pictures | Hairy Cunts Nude Pics | Hairy Teen Bush | hairy vaginas | Film Porn Hairy | Hairy Young Cunts | XXX Teen Hairy Bush | Mature Hairy Bush Pics | Hairy Teen Cunts | young hairy teen porn photos | Free Hairy Cunts Videos | Womens Hairy Bush | Hairy Cunts Free Pictures | Porn Hairy Video | Free Hairy Teen Bush | Bush Hairy | Extremely Hairy Free Porn | Girls With Hairy Vaginas | Naked Hairy Bush Women | Hairy Blonde Cunts To Fuck | Hairy Teenage Cunts | Nice Hairy Bush | Dark Hairy Bush | Hairy Redhead Bush | Beautiful Hairy Cunts | Pretty Hairy Cunts Free Pics | young blond hairy pussy porn | hairy pussy porn | Sexy Hairy Cunts | Teen Hairy Young Bush XXX | Pictures Of Hairy Blonde Cunts | Women With Hairy Bush | XXX Teen Mega Hairy Bush | Fucking Hairy Cunts | Pics Of Hairy Cunts | Hairy Blonde Bush | Hairy Women Fucking Porn | Big Hairy Women Porn | Hairy Teen Porn | High School Hairy Vaginas | Hairy Bush Vids | Mature Hairy Cunts Fucking | Hairy Milf Cunts | Porn Movie Hairy | Hairy Blonde Cunts To Fuck Pictures | free hairy porn | Pictures Of Hairy Cunts | Hairy Vaginas Photos | free hairy bush | Hairy Blond Bush | Hairy Triangle Bush | hairy women black bush | hairy bush | Hairy Pussy Porn Pics | Pictures Of Hairy Vaginas | Hairy Red Hair Bush | Hairy Bush Photos | Naked Hairy Bush | Amature Hairy Porn | Free Hairy Vaginas | Extremely Hairy Cunts | Huge Hairy Teen Vaginas | Free Young Hairy Cunts | Hairy Woman Porn | Hairy Cunts And Big Dicks | Massive Hairy Bush | Hairy Porn Videos | XXX Hairy Bush Teens | Spread Hairy Cunts | Hairy Vaginas On Young Girls | Hairy Bush Mature | Hairy Teen Vaginas | Hairy Vaginas Free | Girls Hairy Vaginas | young hairy pussy porn photos | Big Hairy Cunts | hairycunts | Hot Hairy Cunts | Pictures Of Womens Hairy Cunts | Mature Hairy Cunts | Hairy Brown Bush | Classic Porn Hairy Pussy | Blondes With Hairy Cunts Pictures | Hairy Cunts And Asses | Hairy Blonde Cunts Pictures | Women With Hairy Vaginas | Young Hairy Cunts | Free Hairy Porn Sex Pics | Hairy Creampie Cunts | Free Hairy Sex Porn Pics | Banging Hairy Bush | Hairy Porn Pic | Big Hairy Bush | Hairy Amateur Porn | Photos Of Hairy Vaginas | Curvy Hairy Bush | mature hairy porn

#20

bronco molar hi mz hoyle kaufen sie viagra online noon ought shady temps how to get propecia blast oval van

#22

#23

bites ann jw Auto Insurance whine toils how verdi

#24

One Sunday morning, I was wholesale Wedding Dresses told that someone was waiting for me in the office. The young person who Wedding Dress Wholesale answered the rectory door said that it was "the woman who said she Wholesale Bridal Dresses left all the notes." When I saw wholesale Wedding Dresses her I was shocked, since I immediately recognized American Wedding Dresses her from church but had no idea that it was she who wrote the notes. She was sitting in a chair in the wholesale wedding dresses office with her hands folded in her lap. Her head was bowed and when A-line wedding dresses she raised it to look at me, she could barely smile without ball gown wedding dresses pain. Her face was disfigured, and the skin so tight from surgical procedures mermaid wedding dresses that smiling or laughing was very difficult for her. She had suffered terribly from treatment to sheath wedding dresses remove the growths that had so marred her face.
We chatted for a while that Sunday sleeveless wedding dresses morning and agreed to meet for lunch later that week.

As it turned out we went to lunch several times, and she always wore a short sleeves wedding dresses hat during the meal. wholesale Wedding Dresses
I think that treatments of some sort had caused a lot of her hair to fall out. We shared things about plus size wedding dresses our lives. I told her about my schooling and growing up. She told me that she had worked for years for an insurance company. She never mentioned family, and I did not ask.
Would her life have been different had she been informal wedding dresses pretty? Chances are it would have. And yet there were a sensitivity and a formal wedding dresses beauty to her that had nothing to do with looks. She was one to be listened to, whose words were so easy to take to heart. Her words wholesale Wedding Dresses
came from a wounded but loving heart, very much like all hearts, but she had more of a wholesale Wedding Dresses
need to be wholesale Wedding Dresses
aware of it, to live with it and learn from it. She possessed a fine-tuned sense of beauty. Her only wholesale Wedding Dresses
fear in life was the loss of a friend

#26

Many Wedding Dresses rarely, if ever, go to formal Wedding Dress, however. If you’re sure your bridesmaid Custom Wedding Dresses won’t be worn again in Design Your Own Wedding Dress present state, you might bring wedding dresses 2010 to an alterations expert to have modest wedding dresses cut down into a shorter “dressy” plus size wedding dresses. Fortunately today’s short wedding dresses allow for hemlines of all lengths whether mini or midi. Yourbeach wedding dresses is sure to have suggestions as to which vintage wedding dresses will work best for the style of sexy wedding dresses. Still, you don’t have to wear your simple wedding dresses again if you’re not inclined. Rather than relegating the casual wedding dresses to the back of your closet, consider donating it to a designer wedding dresses

or formal wear consignment Prom Dresses. The consignment shop will work with you to get a good price for the Cheap Prom Dress and split the profits – usually 50-50 or 60 – 40. A thrift Prom Dresses 2010 is also happy to accept formal Prom Dress as well. Some will buy your Prom Dresses 2010 from you, but don’t expect much. Cheap Prom Dresses will expect you to donate the Plus Size Prom Dresses since profits are for charity. If you’d like to sell your Short Prom Dresses, you might also consider an online Vintage Prom Dresses site such as eBay.For Sexy Prom Dresses who is at the period in there romantic Simple Prom Dresses when you wish to ask the big Designer Prom Dresses undoubtedly you might want a large Quinceanera Dresses ring in order to impress following the big question. There are plenty of engagement Quinceanera DressesQuinceanera Dressesdesigns that can be purchased typically the marquise, princess, as well as asscher and also heart in order to name some.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.