drupal views arguments - local vs global - drupal

I am working on the drupal frontend. I want to be able to set an argument for a drupal 6 view which will show up in one display but not in an other aka- make it local not global. Is this possible? Every time I try it keeps adding the argument to all of the displays of the view.

yes this is possible: you need 2 displays (type page) with different URI`s
watch this
youtube video: basic drupal views introduction
If it wont help, please provide screen shoots of your current view configuration

Related

Can't translate block in Drupal

I am building site in Drupal and I need your help. I have an assignment to make one more language translation of the site, and so far so good. However, I have one trouble with one block which isn't going to get translated, even though in the settings I translated it.
Also one strange activity I noticed is that when I try to go to VIEW section of all the other languages, I get dropped to front page (where that block is actually located) but if I press VIEW from my language translation (Swedish) of the block I get to completely new page.
If I go to front page and my language is selected, that block is actually using default language.
Any help what may cause it?
For desire url aliasing you need to install pathauto drupal module. then you can configure alise from below url
admin/config/search/path/patterns
OK, I have found a solution to this problem.
It appears that Drupal 7 by default sets your new language homepage to the default homepage and that's why this block was using default language since it was relying on the front page. Anyway, to fix the issue follow the steps:
Login to adming account, go to Configuration, System, Site Information and in the field Default front page for the language you have chosen navigate to your specific node page. That's it.

Drupal Embedded views not working correctly

I recently took over a site from someone else at a new company. Having never used Drupal before, updating things has been a bit cumbersome. There were some outstanding security updates that I applied(but I haven't updated the core yet). Anyway, after doing this, the calls to views_embeded_view have not been working. For example:
print views_embed_view('news_block');
Will break the links(by using the title, rather than alias for the link), or it will link correctly, but not follow the paging rules I have set(show 1 page, 6 items per page) instead it shows 10 items and has links for other pages.
I am not sure if the update has anything to do with it, but it seems likely. Would updating the core resolve this issue potentially?
The first argument of views_embed_view is view name, the second one is display id. If display_id is not provided, 'default' is used. Make sure that you are displaying the correct display. (i.e. default can be configured differently than some other display which you actually wish to see)

Why does a basic Drupal view return no results

I am starting out with views and I wrote an extremely simple view which really just filters if the node is published and if it is of type banner. In preview and when I try to print the view I get no results. When I search through my content and filter by type banner and published, I get 3 results (in /content/node/overview). I must be doing something basic and stupid, any suggestions for how I can figure out what I have done wrong?
I am starting out with views and I wrote an extremely simple view which really just filters if the node is published and if it is of type banner. In preview and when I try to print the view I get no results. When I search through my content and filter by type banner and published, I get 3 results (in /content/node/overview). I must be doing something basic and stupid, any suggestions for how I can figure out what I have done wrong?
View:
http://www.randomcrapilike.com/test/view_capture.jpg
Have you tried creating a block view and then seeing if it outputs properly in the block region on the front end?
A few troubleshooting steps based on your screenshot...
Try including the node ID in the fields section to make sure the issue isn't with your CCK fields.
Try a different display type than 'slideshow' to make sure the issue isn't with that (non-standard) display type.
Try taking the preview query and running it directly against your database. Do you get any results or error messages?

help me to proceed with drupal views?

I am newbie to drupal , I just created a view called "master" and i wanna manipulate the output pro grammatically for creating widget (javascript widget can embed in other website).
$view = views_get_view('master');
$view->set_display('page');
$view->execute();
$viewArray = $view->result;
$title = $view->display['default']->display_options['title'];
echo "<h2>$title</h2>";
echo("<pre>"); print_r ($viewArray); echo("</pre>");
It prints the result(in object form), But the output contains only 10 result which was mentioned while at the time of views creation.Please guide me,
1.how to get the next 10 result pro grammatically (pagination) ?
2.how to theme a views pro grammatically (since its js widget) ?
3.any live demo tutorial links to play with advanced views?
4.how to do sorting (whether i need to pass through url)?
5.how deal this with handler object?
my view preview looks like this below image
Thanxs,
Nithish.
Well, for #1 all you need to do is go into the edit control panel for that view and change the number of records to be shown on each page. Setting it to 0 lets it display all records at once.
For the others ... I wonder if views is the right solution for you. I suspect you might be better off with a custom module that returns a lot of drupal_json() calls. At very least, it's cumbersome and wasteful to be doing all this through views, since views spends so many cycles on rendering.
If you want to avoid coding a custom module, I'd suggest installing the View Bonus Pack (http://drupal.org/project/views_bonus) and using the 'Feed' display types. This will make it marginally easier to manipulate the results with js.

Drupal, Views: using AJAX to load the complete node?

I've a View page with all the content of my website (the node headers). When I click on one of these header I would like to load the complete node without refreshing the page and display it on the left.
Can I do this with Views (I mean.. does it have a functionality to load a complete node and add it to the current page ?
thanks
I think it is possible using Views. Views is much more than just SQL generator.
Views can work with Fields, or with full node. Set it to full node.
Views can work with Ajax - set it to "yes" (I think it is Yes by default).
It is hard from your description to understand the whole picture, so I can't lead you any further. All I can say is that I use Exposed Filter with Ajax and load full node properly, chaning the content of the page.
Hope I helped,
You are welcome to ask me directly for further support.
Regards,
Shushu
No. Views is basically an SQL query generator. You can do what you describe with javascript, but I don't know what modules might be helpful.
Check out Modal Frame - http://drupal.org/project/modalframe
Basically, your view displays just the title, and you have "link title to node" enabled. Rather than jumping to node page, u want to display node content in modal frame pop up.

Resources