Posted by gobinathm.php on September 6, 2010 at 7:39am
Hey people,
I'm working with drupal views and im new to drupal. I did exported the views and creating a widget with that exported views. I have no idea how to pass argument to that exported views.
i just want to pass url args and filter the views result accordingly and also pagination too.
if i pass ?page=0,1 in url it wont reflect any change.please help me with this.
if you like to contact mgobi.php AT gmail.com
Thanks,
Gobi.
Comments
Your question does not make
Your question does not make any sense.
really i hope you understand by this
I did exported the views and using those code as custom view to create a embed js widget(embed on any website). The embed widget list all our nodes created through custom views and also have some filters along with pagination. i just wanna pass arguments to this custom code to do filter and pagination functions. my code snippets
function view_code(){
http://pastebin.com/YzzzLEbW (i exported this code here)
$view->execute();
return $view->result;
}
function show_widget(){
$array=view_code();
print_r($array);(from this array i created a js widget)
}
right now the returned array just show first 10 result .
i have no idea how to show next 10 result and how to apply filters
Still don't have a clue what
Still don't have a clue what you're asking.....guessing this will help though http://drupal.org/node/129532
That's a really odd way to
That's a really odd way to use a view. I'm not really sure you should be using a View that way, though I guess you can.
If you want to pass in arguments, use $view->set_arguments().
If you want to change the current page, use $view->current_page().
Wow, sorry. I got both
Wow, sorry. I got both wrong:
$view->set_argument(array(arg1, arg2, arg3)) and $view->set_current_page(pagenumber).
let me try those
Hi Merlin,
what else to do lol we did this with custom module, But client (i think drupal geek) rejected those and asking for drupal views widget :(.
Thanks & have a great day,
Gobi
merlin you are geek :)
Hey it works
can you guide me how to do sorting like this way and filtering too please :)
we know i never tasted beer and now i have to do this with you :)
have a great day
He was trying to make widgets
He was trying to make widgets for other websites.
thanx god
jcisio you got it im creating widget with iframe and ajax for pagination and sorting :)