A noob here (2-month old, literally, Drupal-PHP user)
What I am trying to accomplish:
1.1. A map that shows multiple locations as the user chooses them.
Therefore, the map can show 0-100+ of locations depending on the choice/selections that user makes
These locations will be under 1 (one) content_type (ie: business) each with unique NID
On the other word, the business location markers should be toggle on and off, individually (keeping the previous locations choices)
1.2. On the same map, the user can then choose one (or multiple) bus routes. When user chooses different bus route, the location markers (from #1.1 above) will stay on the map
Bus routes will be under another content_type with their own NID
What I had done so far:
2.1. Using OpenLayers module to create the map
2.2. Using Views module to display the map, setting up contextual filter so it can show multiple markers (reqd #1.1)
2.3. Using Views module to display the list of business locations, rewriting the outputs to it point to the URL of the view from #2.2 above
What I still CAN NOT do:
3.1. Creating a view where the list of the business locations are in the form of checkboxes, so the user can choose which locations to show (ideally it should be AJAX-y so the user does not need to press the submit button, but the map marker will toggle on-off as user checks and unchecks the location)
3.2. After #3.1 above is accomplished, do the same thing with the bus route
What I had tried so far:
4.1. Installing couple of View-helper modules, like BEF, VBO, and such
4.2. Try to create a theme the view jumpdown style plugin --> utterly fail as I do not know enough Drupal nor PHP
Can not get this to work: http://www.civicactions.com/blog/2011/apr/15/filtering_a_view_by_a_list_...
Please help:
5.1. to educate me how to create a custom Views Style Plugin (creating checkboxes)
5.2. how to pass the values (NIDs) of the checkboxes to the URL (contextual filter) dynamically
Will it be helpful if I give you the URL of the page I am trying to develop?
I am also open to use different Mapping module if that one has the feature I need
Thank you in advance,
PS: have posted this on the Drupal forum, got no answer so far
Hopefully, this link will help me convey what I am trying to do:
http://link2.cswebdevelopers.com/map-of-lm_locations
On the page above, I can choose ONE location at the time and the map will show a yellow marker. I am using Views 3 and OpenLayer modules
What I would like to do is to have the dropdown or the unordered list on the left sidebar become CHECKBOXES so the user can check and uncheck 1 or more locations and the map will show 1 or multiple markers as appropriate.
Thank you
Related
I need help wrapping my head around how to complete a system in Silverstripe.
There is a page where an authorized user can manage archives. This is NOT in the cms. It is a front end system.
I need to be able to walk the user through creating the following:
1. Archive (it has a year and title)
2. every archive can have many sections with (title, description)
3. every section can have many items with (photo, description)
I can create the three dataObjects but I can not figure out how to:
1. relate them using $many_many or $has_many
2. create a form for each step so the user can add the three different pieces.
This would be easy in straight PHP/MySql but Silverstripe is new to me. I don't need the code per se, just an explanation of how the pieces work together to get what I want. The docs and forums are scarce on silverstripe.org
In order to understand the data model it is best to complete the lessons / read the documentation.
http://www.silverstripe.org/learn/lessons
https://docs.silverstripe.org/en/3.3/developer_guides/model/
http://www.silverstrip.es/blog/diagram-of-relationships-in-silverstripe/
As for the multi page form this module...
https://github.com/silverstripe/silverstripe-multiform
... is perfect for you as it manages multiple forms and temporarily stores all the data, allowing the user to go backwards and forwards through the steps, and only at the last step when all is confirmed is all the temporary data actually processed with one function to create the required objects and relationships.
This module has a fantastic README.md on github and guides you through creating a form very well.
I have a content type named Ailment, which displays all the ailments of the particular user, when u click the ailment, it goes to a particular node, displaying details and graphs of that ailment which is added by the user, this is fine.
Now in another page I wan to search ailment of the whole site and display the ailments, and when they click the ailment it should show the graphs and should hide some fields which shows only for the particular user..
For ex: user A is having a page where ailments wil be listed, when he clicks the ailment, for example cancer, then it goes to myailment/cancer, where some fields and graphs wil be displaying.. this is fine
Now I am having a another page /topailment, where I have a search box, any user can come and search any ailment, it should display the ailment for example cancer, then it should go to the page, topailment/cancer, where it should display only graphs and hide fields..
Hope I am clear..
I am trying to find a solution but going no where...
Please help
Thank you.
this is possible with Page Manager. It will take some learning, but the best place to start is here:
http://nodeone.se/en/learn-page-manager-part-1-overview
Essentially, you want a node to have two different page displays. There are several ways to do this, but page manager is the most direct for me.
Good luck!
Mike
As is always the case in Drupal, there are many ways you could do this. Two options come to mind immediately:
Use views and create a view with multiple displays to renders your Ailment nodes in different ways.
Create custom display modes using the Display Suite module.
You could even go for a blend of both options by creating additional display modes with Display Suite and rendering those display modes with views.
To do it purely with Display Suite: once display modes are configured, you can enable the 'View mode per node' option made available by Display Suite Extras (bundled with the core module) and pass the view mode as a URL parameter to the node. This way you would link to your node as normal from most pages and from the user page you would link to (for example) node/123?v=personalized to use the personalized display mode.
Which of these approaches you go for probably depends on your familiarity with these modules and what you're already using.
There is a module for that :) . It solves this specific problem and plays very nicely with display suite for hiding modules. You have to create a new view mode, assign it to your content type, select which fields you want to hide for each view mode and then you create a URL in your manage fields section for that particular view mode. https://www.drupal.org/project/view_mode_page
I'm new to Drupal and have a basic question which I cannot find a good answer to. I am trying to dynamicly determine the contents of my website based on a selection made by the user and keep the selection displayed in the routing for SEO purposes.
It's a website for a Restaurant with multiple franchises.
What i'm trying to do is the following:
The user visits my website and gets a splash screen presented with the available franchises or a textbox to enter his postalcode
Upon selecting he enters the main website with the navigational structure adapted to the selected franchise. For example: domain.com/city/, domain.com/city/menu, domain.com/city/menu/dishes, domain.com/city/contact, ...
The contents of all nodes are based upon the city the user selected. Some franchises have extra nodes which should be displayed in the main navigation aswell.
What I have thought about so far is to try to accomplish this with taxonomy but I really have no idea where to start. Parts of the nodes will be the same for all franchises other parts will be different. Menu item prices will also be different.
This is the first website i'm building using Drupal so any advice is welcome.
Thanks!
It will be impossible to explain it all here but yes it is possible to select your content based on user input in Drupal. You will need to look into Views & Panels.
In Views you can use arguments to narrow to a specific taxonomy. With Panels , an argument can be retrieved fron the URL and passed to the Views in order to display the results.
There are a lot of resources available, Merlin of Chaos, the author of the Views & Panels modules has written a book about it. There are video tutorials online. Your best bet is to start with drupal.org.
I have a website which is up and running on drupal. Its product based website. I developed by creating my own tables and writing php code using php filters. I never used module concepts. Since the site is running well, so i am thinking to move to module concept. so wanted some help here, like how to do it.. i have gone through module development concepts also.
requirement.
1. Admin should be able to create new products like Mobile, Camera.
2. He should be able to define product properties and properties for which user will rate on.
3. Admin/ second admin should be able to create new sub products under products like mobile - nokia 8850 , nokia 9980 where he enters details of product properties also.
4. A listing page for all the sun products under main product. and from listing page we go to to main sub product page where user rates the product.
My confusion : should i create a new table or drupal takes care of all the requirements. and how do i start with it.
update : clear picture of requirement
ex :
1. 1st i add a product "MOBILES"
2. Then i add properties for this main product.
3. Then i start adding sub products under MOBILES i.e nokia 1100, samsumg 2200 and etc.
while adding sub products, in this page it gives me a text box for all the propeties i defined while creating the main product MOBILES . So is this possible using CCK.
You're right to consider using modules and following the "Drupal way". Use CCK + Views and Drupal will take care of the table maintenance and querying for you.
As already mentioned, you will need to get familiar with the CCK module. This module will allow you to create new "content types", which in your example would be the different product types and their attributes. Here is a good overview video on CCK. With CCK you can define new content types and Drupal will create the basic content creation forms for you and hide spare you from all the database details when you're working with it.
The Views module is essentially a query builder and will allow you to create views of your content. There are all sorts of related modules that can help you render your data as charts, grids, lists, slideshows, tables, etc.
There is a slight learning curve but once you get past it you'll be able to build new things pretty quick.
Update: Just another thought, if you are really needing to create some kind of classification system you should look at Taxonomies.
It sounds like you could do all of this with modules, without needing to do any php coding at all. Check out (if you haven't already) cck, views, and fivestar.
In response to your update, sounds like CCK and Node Hierarchy should do everything you need.
We're looking to build in a filter to our Magento site with drop down choices for the first two options, a selection box for price plus a colour chooser.
Firstly how easy is it to fetch the info for the first two dropdowns from the database so the first box is populated with the first category then the second box populated with the choices for that particular category? (and then change if someone changes the first selection)
Secondly how easy is it to set up a separate filter for each site so it only fetches info for the corresponding store and doesn't show products from other stores?
The filter will only have to show the products when you press a 'find' button so I guess it's a case of building up the search query?
Thoughts and ideas on this would be great, only been working with Magento for a month so still not sure of it's full capabilities.
Thanks
For the second part Magento already shows only products relevant to a given store. When you set up the stores (in System > Store Management) you have the option of giving it a unique "root category". Creating root categories is easy, in Catalog > Manage Categories.
The first part requires some programming work. From your previous questions it looks like you have a good understanding of Javascript so AJAX is not a problem. I don't know how familiar you might be with PHP, listing products will require you create a new module, with it's own controller, that forms a collection from the selected category. Collections make their own queries so you don't need to write a lick of SQL, and they have functions for exporting as JSON or XML so you don't need to write that either. For an experienced programmer it would take almost no time at all.