Are there any views support for stickies at all?

Comments

merlinofchaos’s picture

Status: Active » Fixed

Yes, you can always sort by the node: sticky flag.

Flying Drupalist’s picture

Status: Fixed » Active

Is there some way to theme stickies? Add a css class to all sticky

rows?
merlinofchaos’s picture

Status: Active » Fixed

Yes, override the template from your theme, style as needed. Views doesn't do this automatically unless you're using the node row style, which does theme stickies.

Flying Drupalist’s picture

Status: Fixed » Active

Can you give me an example for overriding the template?

I have this:

      <tr class="<?php print ($count % 2 == 0) ? 'even' : 'odd';?> <?php if ($sticky) { print ' sticky'; } ?>">

And it's no good so far.

I've also checked the docs, and there's nothing there on overriding the template.

http://views-help.doc.logrus.com/help/views/using-theme

merlinofchaos’s picture

Status: Active » Closed (won't fix)

That's a fairly general question; you should try the forums, where more people read and give support. You'll get a faster answer, since here is just me and a couple of other volunteers who sometimes find and answer these posts.

Flying Drupalist’s picture

Status: Closed (won't fix) » Active

Apologies, I got carried away talking about styling, I'll ask about that elsewhere.

How do you set sorting by stickies and by last node comment? It seems as if it's either one or the other. I thought I had it working earlier, but no go. I set the table style to sort via stickies and 'default sorting' to sort via last reply, but now I realize that table style just completely overrides default sorting. Is there any way for stickies to function as intentioned? Thanks.

Flying Drupalist’s picture

Rephrasing my question a bit, is there any way to sort via 2 properties at the same time, but then have 1 override the other?

dawehner’s picture

just add two sort options

for example first sort by sticky and then sort by created

but you still need the custom theming and this can be done as a custom views template.

do you still need support for this issue?

Flying Drupalist’s picture

Status: Active » Fixed

Nope, I've figured this out. Thanks!

Views is great.

Flying Drupalist’s picture

I should add that the reason why it wasn't working last year was because the sorting options in the table options was overriding the main sorting options. That it would do that should be made a bit clearer in the descriptions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.