Hierarchical select module issue in drupal - drupal

i am using 'Hierarchical select' module in Drupal to create 2 drop down of States and cities and connecting the city ones to state in a way by changing the state,the list of cities changes too.(it is beside of CCK and taxonomy content module)
The problem is that by selecting the state and city for a new content,just the city shown.but i need both of them,State - city combination.

Hierarchical select is UI representation of hierarchical structure of vocabulary that is normally shown in a flat list.
From a single vocabulary (if multi select is disabled) you can select only one term. Selecting a leaf would not enlist parent tids.
Use taxonomy_get_parents() or taxonomy_get_parents_all() functions.

If you have all that data inside of one vocabulary and cities are children of states, once you select a city, it should display State >> City on the node. if you're displaying them with $terms; then it should display in such fashion.

Related

Node titles as select list in views

I Have two content types.
School
Title (name of school)
location (geolocation - geofield)
User Properties (students)
school (entity reference)
class
Now I want to filter every school by title in a view as Exposed Filter. How can I display all names as select list? The filter works perfectly by typing the name.
Thanks!
Views Reference Filter module should do what you are looking for.
Alternatively you create the select list in a hook_form_alter on the view exposed filter form.

Dynamic drop downs in Tridion designing in schema in SDL Tridion 2011 SP1

I am working on a Schema creation in SDL Tridion 2011 SP1.
I have struck at one thing.
I have to display three drop downs to user.
List: Country
List:State
List:Location
If the user selects one country in the drop down, need to populate the states according to it. Depending the selected state I have to populate Locations.
I thought of implementing through Categories.
Created categories to countries
Created States as Abstract Keywords under for each country.
Created locations as Normal keywords under every state as normal keywords.
Can any one suggest how to achieve the following:
I will have three drop downs, for Country, States, Locations.
If the User selects any Country, the states should be populated accordingly and depending on selected state the locations should be populated.
Do I need to do any customization to tridion or it can be implemented in Tridion directly?
Do you really need to select Countries and States? If you select a Location keyword from the taxonomy structure, you are indirectly selecting the Country and State. I would implement this as a single tree type keyword field.
E.g. Select "Dallas" and it will imply that you have selected "Texas" and "USA"
That way you only need one field. In the CME you will see be able to see items classified against USA by including child keywords, and on the Content Delivery side you will be able to query the content.
Do I need to do any customization to tridion...
Yes. If you want this exact behavior in the Component editing screen, you would need to implement it in a GUI extension.

Drupal assign taxonomy to content( story )

I have a Druapl application in which the taxonomy is supposed to have 4 nested terms for eg
Sports->World->Country, so when we create a story the taxonomy option is displayed as multiple select box with values nested inside.
Like this:
Sports
--World
---United States
---United Kingdom
---Germany
---France
---So on
So when creating content it will be a huge task for the user to pick one from the enormous list. Is there any way I can split the select box in to 3 where selecting the first level load the second level in another select box and so on.
Or where should I customize ( the files which displays this select box ) this select box.
Any help highly appreciable
Thanks and Regards
Check out Hierarchical Select module - http://drupal.org/project/hierarchical_select

Multiple ListBox's in Drupal CCK?

I want to create content type with multiple ListBox's which populate dynamically depending on the previous.
E.x. If user selects the continent the next list box shows the list of countries present in the continent .
I think what you need is Hierarchical Select
also: http://drupal.org/node/212834 (see comments also), but Hierarchical Select at current state is the best...

Drupal 6: creating location list manually or dynamically via cms

I'm starting my first Drupal project, pretty excited :) I have a question;
the project is a hotel directory site. at sidebar I have locations list (London, Manchester, Liverpool, etc..) and filter the hotels related on location click.
So, how should I create these cities? Should I put them manually and give links manually depending on location id? or is there any better way to create this location list and linking filtering dynamically (via cms, or custom module, etc...)
Appreciate advices!!!!
This would be a good example of when to use the core (part of the base Drupal software) Taxonomy module. With Taxonomy you can set up one or more lists of terms that describe some or all of your nodes. For example, you can have a list of locations, a list of amenities (pool, sauna, golf course, etc.), and a list of price ranges (low, medium, high).
For each hotel you can select a location from the locations list, one or more amenities, and a price range. Then you can select all of the hotels that match one of the lists, using a neat feature of Taxonomy where it will return a list of those nodes.
The lists of terms are called "Vocabularies", and you'll want to create a vocabulary for each list. Go to Administer -> Taxonomy -> Add Vocabulary. Give it a name, like "Location" a description if you'd like, and choose the content types that it should be allowed to be associated with. (In your case, the hotels should probably be a custom content type that is different from the Page and Story types, but for trying this out, just pick Page for now.) There are several checkboxes at the bottom to decide on: Don't check Tags or Multiple Select, as these allow free tagging by users (images users making up city names) and also allow a node to have multiple locations. Do check the Required checkbox, as each hotel should have one.
Click Save and then click Add Terms on the vocabulary list page, and add a few locations. Then create a few hotel nodes (Pages for now) and you'll see that there is a new section in the Create Content page that is a dropdown selector that contains the locations. Choose one for each hotel, and add a few hotels in the locations that you just created.
To select the hotels for a given location, you will need to know the path associated with each term. Go back to the Taxonomy admin page and choose List Terms for the Location vocabulary. On the Terms in Location page you can get the list of hotels for a location by clicking on a location's name. The resulting page's path (e.g. example.com/taxonomy/term/2) would be what you'd use in your menu for that location. Each location will have its own term number that would be at the end of the path.
This is the simplest way to use the Taxonomy module, but it works really well with other modules like Views. Using Views you can control the format of the list of hotels for each location.
For more information, see the Taxonomy documentation and especially this sub-page called About Taxonomy.

Resources