Implement sticky articles in Drupal views? - drupal-7

I have a Drupal 7 view with articles sorted by date.
I want the option to make any articles sticky ie top of the list via publishing options and then sort by date.
How do I configure the Drupal 7 view to enable this?

You can add multiple sort options in your view configuration. You would create the first sort to be by stickied items (descending), and the second to be by date. In the sort options there is a drop-down and you can select re-arrange. From here, ensure that the sticky sort is first in the list.

Related

drupal views display needs multiple sort order for exposed filter

I have a 4 quicktabbed views blocks on a page and rightnow. All blocks show lists that can be sorted by "Title" with an exposed filter and a sort order dropdown button for options "A-Z" and "Z-A". So the user can view the list either way. I need to add another exposed filter option for posted date. I see how to do that and it's now an option in the pulldown button that shows "Title" but I can't see how to add option for "most recent" and "oldest" either in the sort order dropdown button or anywhere. Can this be done in the views UI or is this going to involve some php coding? If php, where do I start, given I'm a php newbie?
I don't know if you've figured it out yet, I had to do something similar recently.
this answer helped me [Drupal 7: Exposed filter on a post date just to set up a created date filter.
As for the newest/oldest sort, you add Content: Post date to your Sort criteria, the you could maybe check the Advanced sort options in BEF Settings for your view. There you can combine 'sort order with sort by' like the following current_value|replacement_value pair:
Publication date Asc|Oldest
Publication date Desc|Newest
Let me know if that was helpful in any way or if you need a more detailed answer

drupal 7 create a views block that displays based on date range of current node

I've searched for days and not found a clear answer for this.
I'd say I'm intermediate with Drupal (at best). I'm using Views, Panels, CCK, and the Date modules (among others, that may not relate to this question)
I've got a content type of Shows (plays), that has a date range field (from the date module) that is the run date of the show.
I've got 3 views blocks that I filter using the Content: Show Dates - start date and Content: Show Dates - end date fields. These display a list (links) to shows that are of 3 categories, now playing, upcoming, and past shows. They work fine.
Now for the tricky part (for me). I want Panels (Node rewrite for Shows) to decide which one to display in the sidebar while looking at a Content:Show based on whether it is currently running, yet to run, or in the past.
What are the steps to make this happen?
thanks!
jason
Edit: I'm working with Blocks too.
I would suggest to create 3 views (not necessary blocks if you have enabled the "Views content pane" module), one for each date option with a nid as Contextual filter and a display of Content:Node. Then add all the 3 views in one panel page variant one after another. Probably you already have these blocks. So you can clone them and just add a nid Contextual filter.
Another option is to create 3 different variants for the same node type and add a Selection Rule for the Show Date field (Selection Rules screencast). If there are no filters for the date field add some php code. Here is an example.

How to list most visited links in Drupal from different pages?

I have made one block for most visited links (Top Links) in my drupal website but I dont know how to list most visited from different pages. For example, if I have created a page named drupal and within that page i have added some content with some title, then i have to examine and count those titles and list the top visited title from each and every page on my homepage(only one from each and every title that is most visited) and list them on my homepage block.
Could anyone help me with this.
Thanks in advance!
Make sure the statistics module is enabled. Visit /admin/config/system/statistics (Drupal 7) and make sure Count content views is enabled (ticked).
Use views to create a block the usual way; for example add a field like Content: Title. Then make sure you add a sort criteria of Content statistics: Total views (desc).

Drupal 7 expanding fields

I have a field in a cms called 'services' the services is a lsit of checkboxes with the values
1|digital
2|web
3|print
4|apps
The issue is each of the options has a related url. Is there way to link a url to a 'service' or am I looking at taxonomy to solve this issue?
You need to use a taxonomy. A select list is simply a key/value pair with no other additional data. If you build a new taxonomy, you can either use the taxonomy URL for your purpose or you can add a Link field and give each term a specific URL and tie that in somehow, maybe through Views or a custom display.

Drupal 7, Views, Groups, and Feeds - Creating View for Feed Items in a Group

Before I get into the details, here is the overall goal:
I want to have a group of users which get access to a feed, and any new items that appear in that feed they will get access to as well.
Details:
I am using Organic Groups, Feeds/Feed Items, and Views. I have setup a single Organic Group and added a single user to it. I have taken a Feed and added it to the group as well.
I have tried a few different combinations of the queries for Views and here is where I am at currently: http://cl.ly/2T1a0s1A0j3A0I0d3i1u
There is a relationship setup between the Feed and the Feed Item. There is a filter setup that says if the user has permission to view the Feed they should be able to see the Feed Item.
However, when I login to the user account and visit the URL (which used to just be static and take no arguments, ignore the % I just added) I get a blank page.
It would be great to get some help figuring out this problem and/or some pointers on how to debug it + learn more about Views and how I could use Views/OG to solve this problem.
Thanks,
David
The best way I did OG Groups was to create the group under content type. Once that is done. go back into content type and click on Feed scroll down to OG Groups tab click on it. You should seeNODE in the drop-down box and Groups in a select box below. Make sure node is clicked and Group is highlighted. Click save and now do the same for Feed Item. There is one thing to be mindful of, when the feed imports, it will be bundled with the group however the feed it self will be separate from the nodes created linked only by the group. One way to make it easier to manage is to place the feed and the feed items into the same book when setting up the feed. It akes life much easier that way.

Resources