toggle between views in drupal - drupal-6

I am using views to show some nodes data. currently I am showing 4 nodes at one time in a view... but customer need a toggle to view 1 node or 4 nodes... I need it Ajax based.
Any idea how to implement it or any direction??
Thanks.

You could create two views, one with 1 node and one with 4 nodes, then use the Quick Tabs module to toggle between the two views using Ajax.
You could also accomplish it with a single view with two different displays, then use the Views Display Tabs module to do the Ajax toggling.

Why don't you add an exposed filter to the view and allow the customer to change the amount? I'm sure if you set the view to use ajax the filter would be ajax based.

Related

Create a custom view using a p:schedule

Hi is it possible to create something like this with <p:schedule>?
This view represents room booking where the line on top represents list of rooms. This view shows which room is available on what time, making in much more clear than the standard view.
Instead of event title I use drop down list of rooms. These rooms should be displayed in the top line.
No this is not possible. PrimeFaces uses jQuery FullCalendar so please check out its documentation on how to customize it and if it is possible at all.
But even if you can customize it, it is not certain that you can also use the same procedure to manipulate a PrimeFaces component.

Using the DataView in XPages Extension Library Mobile Controls

On page 1 of a mobile app I need to display categories from a categorised view. When the user selects a category the app should transition to page 2 showing documents in the selected category. The customer does not want the category to expand/collapse on the first page of the app.
Would I use the DataView for this? Any advice on how best to achieve this?
Thanks.
if something like this http://sutol.mapsys.cz/ (application is in Czech, but you can still see what it is about) is what you need, I can send you the code.
"dopoledne" and "odpoledne" are categories
Yes what you want is a dataview, there is a property to disable collapsing / expanding of the category sections.
My suggestion would be to view either of the remodelled templates "Discussion 853 XL" or "Teamroom 853 XL" that come with the ExtLib, these applications have been modified to add mobile front ends and are great examples of how to build mobile applications
I do something along these lines in mobile pages of XPages Help Application - Contents and Index views both drill down from categories to documents in the category. I think I just use a repeat control.
The one thing to bear in mind is that you cannot currently redirect to the current Mobile Page with different parameters. That's why I switch between two mobile pages that use the same Custom Control for the view.

in drupal how to display 2 views with filter exposed in same page/path?

in drupal how to display 2 views with filter exposed in same page/path?
Have you tried having each view as a block? That way it is simple to have two different views on the same page - for example add the blocks to the body and limit them to the specific page. caveat - I don't know if exposing the filter makes using the block view problematic, but it is certainly worth a try.
The way I solved this is described here:
Create a view with two "page" displays
Make sure the filters are identical in both
Under exposed form set "Exposed form in block" to "Yes" in both
displays
Make the second display appear in the footer of the first
Set the exposed block to appear only in the path of the first
display
Now setting filters affects both displays.

working with forms and ajax in drupal 6

is it possible to alter a form after an ajax call?
what i want to do is this:
i have a form with some textfields and a select box with 2 options.
what i want to do is when a person chooses one option, i will unset some of the textfields(depends on which option the user choose).
i do this with ajax because i need to load from my DB which input to disable.
ofcouese i can hide it with jQuery(which i do).
but i was wondering that if there a way for doing it in the ajax server function.
10x.
I would get a look to the Form API of drupal and how AHAH (Asynchronous HTML and HTTP) works here
and here you'll find a small example how to implement it.
Anyway you can always give a look on modules that are using it like pools, filefield (CCK), etc.
cheers :)

combine 2 view into 1 view

Is there a way to "merge" 2 different views into one view?
i need to control how many of each content type are displayed
Just use the panels module. With panels you can define a page with different regions (you'll probably need two of these). The content of such a region may even be a view and you are able to restrict the shown entries of each view through the panel ui.
http://drupal.org/project/panels
You could create the second view as an attachment to the first view. This is likely the easiest way to go about it. The attached view can inherit any arguments used in the first view as well.

Resources