<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>But the question is how do I sort them using an argument?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If you’ look here:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.premiumbaby.co.il/koziol/drupal-7.0/%D7%9E%D7%95%D7%A6%D7%A8%D7%99%D7%9D">http://www.premiumbaby.co.il/koziol/drupal-7.0/%D7%9E%D7%95%D7%A6%D7%A8%D7%99%D7%9D</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>you’ll see grid of products, each item is actually a views slideshow of product entities of the different colors.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>What I’m looking to achieve is to load the view with an argument that would cause all the green products to be displayed first, or on a different page use a different argument and have all the orange products displayed first.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for the idea though.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Idan<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> development-bounces@drupal.org [mailto:development-bounces@drupal.org] <b>On Behalf Of </b>Justin Ellison<br><b>Sent:</b> Monday, March 28, 2011 5:44 PM<br><b>To:</b> development@drupal.org<br><b>Subject:</b> Re: [development] how to use an argument to get a row to appear first in a View<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I had a similar requirement recently, and came up with what I thought was a pretty slick way to do it.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>My requirement was that a list of nodes needed a variable-sized list of "sticky" nodes that would float to the top of the list. The sticky list needed to be able to be manually sorted by content admins. Any slots in the view not filled by the sticky list could be filled with a "most recent" list of nodes.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The answer is to use nodequeue to create the sticky list. In the admin options for node queue, there's an option to display the list in reverse, select that. When defining your view, define your first sort order as the nodequeue position descending. Set your second sort to be create date or whatever.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The key is that any nodes not part of the nodequeue will have a position of NULL, and will naturally float to the bottom of the results. If the view is set to display 10 results, and the nodequeue is 6 items, then the remaining 4 items will be filled with the most recent nodes. If a content admin changes the nodequeue to be only 2 items, the remaining 8 will automatically fill in.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>This approach might be a bit overkill for what you're doing, but it will certainly work, and will give you some room to expand.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>HTH,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Justin<o:p></o:p></p><div><p class=MsoNormal>On Mon, Mar 28, 2011 at 10:30 AM, John Fiala <<a href="mailto:jcfiala@gmail.com">jcfiala@gmail.com</a>> wrote:<o:p></o:p></p><div><p class=MsoNormal>On Mon, Mar 28, 2011 at 9:03 AM, Idan Arbel <<a href="mailto:idan@arbel-designs.com">idan@arbel-designs.com</a>> wrote:<br>> Hello,<br>><br>> I have a views slideshow, and in some cases I’d like a certain node to<br>> appear first in the order, I don’t really care about the rest of the nodes<br>> just to move a certain node to be first in the slideshow.<br>><br>> I’m looking to achieve this using an argument, maybe sending in the nid, or<br>> even better a certain value for another field.<br>><o:p></o:p></p></div><p class=MsoNormal>Hm.<br><br>Well, if you've got no pager, here's an idea:<br><br>You've got two displays - one display (the main one) which displays<br>one item, and a second display that displays the rest. Display one is<br>set up to display only the node provided via the argument, so that's<br>automatically first. The second display is made into an attachment on<br>the first display, which inherits the same argument, only on the<br>second display the argument defines the node that isn't displayed.<br><br>The tricky thing is the way you're displaying them as a grid - that<br>may not work with having the page split into two views without a lot<br>of work with css and/or alternate view templates. It might be simpler<br>to have a 'grand' display of the argument node on top of a grid<br>showing the rest of them.<br><span style='color:#888888'><br>--<br>John Fiala<br><a href="http://www.jcfiala.net" target="_blank">www.jcfiala.net</a></span><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>