[support] 'Sticky at top' not working for me

Marc Poris marc at funnymonkey.com
Fri Mar 7 21:19:59 UTC 2008


The $sticky variable gets set automatically by the phptemplate engine in 
phptemplate_node() where the comment says "Flatten the node object's 
member fields" -- it's not the problem in this case, but verifying that 
the same thing happens when using another theme is always a good idea.

Check these things:

1. Have you overridden the 'node' view using the Views module?  If so, 
are you sorting first by Sticky?
2. Do you have a separate front page that's showing the nodes, or is 
this happening on all node listings (ie. via Taxonomy, etc...)?
3. Are you sure there are some nodes set to 'sticky'?
4. Are those nodes also published?
5. Does the viewing user have access to the sticky nodes (has another 
access control module been installed that may be hiding these nodes)?

Marc



Jody Cleveland wrote:
>
> On 3/7/08 10:37 AM, "Earnie Boyd" <earnie at users.sourceforge.net> wrote:
>
>   
>> Quoting Jody Cleveland <cleveland at winnefox.org>:
>>
>>     
>>> Hello,
>>>
>>> I've got a site running on Drupal 5.7 that sticky just doesn't work with.
>>> I've got 5 other sites using the same Drupal installation and none of them
>>> have this problem. I'm using a custom theme on that one, and I can't help
>>> but think it has something to do with the template. But, I have absolutely
>>> no idea where to even start on this one.
>>>
>>> Any ideas why Stick at top wouldn't work? (it does this for all content
>>> types)
>>>
>>>       
>> Does the template have any $sticky php elements?
>>     
>
> I have this at the top of node.tpl.php:
>
> <div id="node-<?php print $nid ?>" class="node<?php print ($sticky && $page
> == 0) ? " sticky" : ""; ?><?php print ($page == 0) ? " teaser" : " ";
> ?><?php print ' ' . ($node->type); ?><?php print ($submitted && !$page) ? "
> cal" : ""?>">
>
>   




More information about the support mailing list