Drupal Views pager not working but results showing - drupal

We have a view setup to pickup the author/id
I see results, however, the pager is not working. We have a pager set, but at the bottom, it says "No query was run".
In addition, if I use the contextual filter and type author/110, it shows nothing on the preview, even though the regular page shows results.
How can I filter and get the pager working.
Update: I chose "Full Pager" and I can see it on the preview, but not the regular page after I save. What could the problem be?
Update 2: If I set pager id = 1 or higher, I can see it on the preview AND the regular page. However, it has odd url values with commas, is page 2 really Page 2?

The $pager variable within the templates (in views - theme information regarding active template name) might be missing or check for any views hook (there are min. 8 of them) that is changing the behavior of the views.

Related

Drupal + Views Slideshowplugin?

I have a question, but the problem is, I can't show the page right now, because it's only on my local server. I will try to explain it as good as possible.
I've got a view that makes my frontpage have the full content of my nodes. So you see a node(in this case an embeded youtube link). You can then go to the next node via "next" or to the previous one via "previous", etc. The problem I have and I don't know how to fix is:
I got a gallery below(another view), of all my nodes, so you can either click through the prev and next buttons, or click on one of the pictures in the "gallery". But when i click on the galery, it goes to the node links so lets say "site.com/node/44".
Is there a way I can go to the node/44 page and still be able to click prev and next? And moreover, can I use the Slideshow plugin by views with changing links? Because it's just says "#" in the url... Like it does with the main content when i click "prev" and "next"?
I hope you can understand what this is about :-). If not, please feel free to ask for further information.
So your explanation is a little "garbly" so here's my somewhat 'not-so-garbly' response:
Sounds like your understanding of views is a little low. Make sure you're Displaying fields in your view and not just full nodes or teasers.
Next, if your desire is to show the gallery on all the nodes of the same type, you can so by creating a block display in views and configuring that block to show up ONLY on the node type you desire.
It gets complicated when you (which appears to be your desire) want the view to start from the last point you were viewing. This will require rewriting the field (this is available via the field configure form) which contains the image. You'll have to add a parameter (probably the current nid) which can be added, hidden, then accessed as a token via the Views Fields interface as well.
I don't remember exactly how to get the view to display the current (or next) slide by default once it's clicked.. but this is probably how I'd do it:
pick up that parameter in JS / JQ and use it to find the slide you want to display... then fire the JS function needed to display the desired slide.

Drupal 7 Theming a view

I've created a views called event which lists all 'event' content type pages, however I want to style the list by adding a "read more" button as well as other styles. I have created a blank template called views-view--event.tpl.php and I can see now that this is used because the view no longer lists the pages, instead it is blank (as expected). However, how do I now add the pages back in? I.e what php variables etc can I access from here? I've tried to echo a simple $title but this doesn't work. Is there a global variable that I can access? If so, what is it? I simply want to replicate what the view was doing before I created the template but with the ability to style it how I wish.
Go to your view display and look at the bottom of the "advanced" column. You'll see something like "Theme : Information". Try to locate your template name and click on it to get it's base code.

Different pages for showing different fields of a single node in Drupal 7

Is it possible to elegantly do this? The idea is, a node of content type "project" has a lot of fields, its url is something like node/5. I want to show some of the fields on that page, and others on node/5/extra, kind of an "extended" page that the user only loads if he is interested in that content (lots of images, in my case, that would slow down the main node page considerably).
I tried the Display suite module, unsuccessfully (it seems it's not really meant for doing what I want). I also saw this blog post, which explains how to add a custom display mode to a content type (other than the Default and Teaser ones that come by default), but I can't get it to work the way I want to either.
I guess you could create a view having the node ID as a default argument from URL. Then you can choose which fields to show or hide

Issue with "modify taxonomy"

I'm working with Drupal 6 to create a feed collecting site. I import the original feeds via the feeds module and copy their tags. But I also want to assign a category (terms from second taxonomy) according to the author name to be able to divide the content in a unified way.
I want to use the rules module (rules-6.x-1.2) to assign these categories upon import. I use the following steps:
ON event Content is going to be saved
IF textual comparison ([node:author-name], TheAuthorName)
DO Modify node taxonomy terms (saved content, permanently, add the selected terms)
I select the terms to be added as "-none selected-" for tags and "TheCategory" for categories.
Now, when I import the feed, the category "TheCategory" is added to the content, but the tags vanish.
This happens also if I select "Replace existing terms with selected ones" or "Replace terms within same vocabulary" for the action. Upon editing, always the radio button of "add …" is selected, regardless of what I entered previously. And yes, I clicked on "save".
Is this the right way to do what I want? Why isn't it working? Could I do this with another module maybe (I don't need rules for anything else …)?
Thanks for your help!
Ok, so I found out that the right trigger to do this is "new content is created" (which I somehow couldn't get to work beforehand).
So, I ran the rules module in debug mode and found that the rule was triggered, the filter returned TRUE and the modify node taxonomy action was successfully accomplished. But the taxonomy was entirely unchanged.
I played around a little and postponed a "save content" action on the newly created content. Turns out, this fixed the problem and now everything works as I intended.
Still, there are some flaws:
I checked "permanently apply changes", but it did not do anything.
I unchecked "permanently apply changes", but upon editing again, the box was checked again (probably the setting was not saved to begin with)
The same holds true for the radio buttons for the type of "modify node taxonomy" action which was obviously not saved
Maybe this can help someone.

Drupal: can I specify a View for my search results?

I have a "Search" field in my website and I was wondering if I can assign my View to the search results, instead of using the default list.
Is this feasible ? How ?
thanks
It is possible to handle the search output by a view using the default search forms without exposing filters:
create a view of type content which displays all content types, display page
set Path: /search/node/%
add Contextual Filter "Search: Search Terms", then set "Provide default value" and "Raw value from URL" and "Path Component" to "3".
Now, every time you search for a node your view gets called instead of the default search result page because it is using the same path than the default search. The % is the argument which is handled by the Contextual Filter. Do not forget to set the filter to the 3rd component of the path which is the placeholder "%".
You can replace the default Search with a Views search instead. I haven't done this personally, but from what I've read it sounds straight forward. Create your "Search" View, then display it's "exposed filter" form instead of the default search form. More details here... http://groups.drupal.org/node/18582
Or, if you just want to make the search results look different, you can simply theme them, instead of using Views to do the searching. You can also control what fields (CCK and such) get displayed in the search results on the Display Fields > Search tab when editing the content type. I don't know the name of the template file for themeing search results of the top of my head, but if you have Theme Developer installed you can easily figure this out.
I've actually found the item "Search" in my Filters options in Views. I dunno how I could ignored it before. It actually exists, and works quite well. Solved.
You can use views to do search with exposed filters etc, but this is not a functionality that you can put on the search you have already. You can create a block in your search view and with theming replace what you got now with it instead.
This probably requires some work since the search box is usually not located in a region.

Resources