How to create sticky news item(s) in Plone 4 - plone

How can I create sticky news items? Our homepage features a news collection (news items housed in folder) with certain criteria selected (published, tags, published date; reverse order). The homepage news gets updated just about everyday; however on occasion there are 1 or 2 news items that need to stay at the top of the news list (collection) for an extended period of time. How can I do this?
I searched the Plone User Manual and Plone site; tried several collection configurations; looked at addons like ListingPages and Plumi but neither appear to have the feature I'm looking for, and have searched the web for "sticky content" "sticky news item" and have not found a solution. If anyone knows how to do this and wouldn't mind sharing, I really appreciate it! Thank you!

You could do it like this:
add a second collection in hp for featured news
add a news item with a tag "featured"
copy all criteria from the first collection to the new one and add a criterion on tag and select as tag "featured"
Then when you want a news item to be removed from the list, just remove the "featured" tag from it.
Alternatively you could customize your news item workflow and add a new state "featured" (the rest of the process is pretty the same).

collective.flag gives you the opportunity to mark an item as a special object, which makes semantically more sense than using a tag/keyword or workflow-state for distinction, I think.
Display and sorting can be done via collections (as Giaccomo also wrote), I recommend ContentWellPortlets to place portlets where you need them.

No release yet but I just came across davisagli's "collective.sticky": https://github.com/davisagli/collective.sticky/

I would suggest you to take a look at this old blog post: Beyond News Items: the need for news industry standards in Plone.
We've been working on collective.nitf, a new Dexterity-based content type to solve this kind of issues. It's pretty ready for production on sites using Plone 4.1 but right now we are in the middle of some minor refactoring.
I will release it next week as soon as we complete the move of some code to another package and change the name of a field.

afaik there is no way to create what you call sticky news in stock plone.
you could try soring by effective-date (newest on top) and set the effecitve date manually for your sticky news.
set a time <= now and > than the creation date of the newest newsitem that should not be sticky.
unfortunately this means touching your sticky notes each time you add a new news item.
or set the effective-date of your new newsitems so its before your sticky news and after the newest non-sticky news.

It's an ashamingly outdated method but hey It Still Works™: you could use Products.CMFPublicator to achieve what you want. Have a look at it and reply here if you have any doubts.
Another old-aged solution would be using Products.CMFContentPanels. You can even try a combination of both!

Another approach to sticky news item: http://pypi.python.org/pypi/collective.stickyitem

Related

Relationship based Taxonomies Dropdown

Please help.
I am very new to web development & don't have any computers background. I have created a pincodes database Website pincodes.forinfo.in using WordPress. I want a relationship based dropdown Taxonomies like www.pincode.city.
I have tried many ways from last 6 months but failed. Please help me.
I have custom Taxonomies State, District, City, pincode. I need a taxonomy dropdown, when user clicked on state the second dropdown should show the Districts of that particular state. Like wise when a user clicked on District the third dropdown should show the cities of the particular.
How can it is possible. Please help me.
I want show this dropdown on a WordPress page.
If you are using the latest version of Wordpress then I do not see the reason to be baffled by this, since you will be able to manage this from Appearance->Menu.
Check out my screenshots.
Click on the Screen Options button on the top right corner of the
Menu page. Screen Options
For me, Types is a custom Taxonomy, so I select it. The taxonomies appear on the left now Custom Tax Appears
You can now add the links to your menu and then arrange it so that it becomes a sub-menu of your primary menu.
This is how your menu should look if you want your custom taxonomy to be a sub-item of another menu item.
Sub menu items
You can do this by holding and dragging the item slightly to the right.
You can stack such items one below the other and create endless sub-menus.
I must mention that there are some themes that do not support sub-menus. If you theme doesn't, change it and check again.
Things that you need to do to implement your idea:
Get a good autocomplete plugin - Easyautocomplete (Much better than jQuery UI autocomplete)
Create three input boxes on a custom template page
Use enqueue_script to get your JS files to load with your Wordpress installation
Bind autocomplete to the three input text boxes
Learn how to query your Wordpress installation for your taxonomies
Use a php file to transfer a json file of your taxonomies to the autocomplete function - I would recommend this AJAX plugin
Have conditions in your php file according to which the 2nd field's values are fetched after getting the value of the first field and similarly for the third field
As I said, it's a lot of coding, and if you are really starting out to code this yourself, without much knowledge of PHP or jQuery, it's going to be very difficult. I would suggest you take the help of a developer.
You can even send me the details of logging into your Wordpress installation, if you want me to take a look.
Mail me at arunadaybasu#gmail.com

Listing past events and all news items with certain category in Plone collection

Using Plone 4.2, I would like to create a collection showing:
all past events and
all news items with a certain category
Nice-to-have: ordered by start time (in case of event) or publication date (in case of news item). If this is not possible, then order just by publication date for all
How is this possible? As far as I see, I cannot have an "OR" combination of criteria but only "AND"
Background: I would like to have an "Events Archive". Problem is that older "events" are only available at this plone site in the form of "This month' events overview" kind of news items (because they actually stem from another CMS and where imported).
ok, this does not work with vanilla plone collections. Only solution would be to install AdvancedQuery and create a custom template and catalog query.
You can still use the old-sytle-collections by activating them in the portal_types-tool.
They provide also an 'or'-operator, yet are deprecated.

Drupal Taxonomy associate to content

I have some content I need to start categorizing. We've built the system a while ago, the content is growing a lot so now we're finding a few years later we should start categorizing this stuff. How can I enable taxonomy for this content?
Thanks
Jeff
You can absolutely enable taxonomy on already existing content types and nodes. There will be no effect of course until people actually edit the content to add terms.
In order to categorize the content I would recommend http://drupal.org/project/views_bulk_operations
It's awesome and saved my in the past during migration cleanup! Throw on some "exposed filters" for node type, then add some field columns that will help you sort things, make the table columns sortable, so you can sort on the fly.
Then add in your allowed actions on the view style to enable updating taxonomy terms in bulk.
This should take care of our needs.
BTW: If you find yourself changing your mind about categories you should make use of http://drupal.org/project/taxonomy_manager to MERGE terms and thus the associated content.
You can add term reference field to your content type and this will give you a field through which you can tag your content and categories it.
Then as doublejosh mentioned you can use Views Bulk Operations (VBO) module to categories your content in bulk as you said you have lots of content to categories.
Definitely tough to go back and get content categorized, but you have better options that just Views Bulk Operations... unless you just have a few categories then that will do the trick.
You can use varying levels of machine learning to automatically tag content. I've had lots of success using Open Calais to tag 100s of 1000s of nodes coming in via Feeds in the past. This is fairly exciting once you get it going :)
OpenCalais module
Auto Categorise
Auto Tagging

Drupal: Content in blocks from node_reference fields?

After only a few weeks of working with Drupal I've come up with a recurring problem, which I don't really have an optimal solution to, so I'm hoping that someone here might be able to give some best practice pointers.
What I have is a region inside my node.tpl.php, which is populated with blocks that display content from two different CCK fields of the type node_reference. This works fine when displaying a single node. The problem appears when I need to use a view.
For example, lets say I have a news listing, and a single news item view. When I display the single news item I can use the news node node_reference field to reference whatever material I would like to have in my sidebar, but when on the news listing view I would like to reference nodes separately. What would be the best practice to solve this?
I'm having a few ideas, but none seem like the logical choice, how would you do?
My understanding of your problem is that you don't want the blocks to display on the view page and you want the block information displayed inline with the node.
The first part is easy, you can modify the block visibility settings to not show up on the path where you have the view.
The second part will depend on how you set up your view. If you are using fields you can simply add fields for the node_reference and they should display. If you are using a node view, you will have to override the template and create a template which displays the node reference field.
If you want further explanation please comment and I can clarify
After reading my question I realize that it was explained pretty badly, so I'll try again, and also tell how I solved it.
The Problem
On normal "pages" (when displaying only a single node), I have a sidebar that shows something similar to banners, which are either random, or I can select one or many that should always be displayed on the sidebar. This is solved easily when displaying a single node, using a CCK node_reference field. The problem is when using a View that displays multiple nodes, for example a news listing-
The Solution
In my case I could solve this by creating additional fields on my default Page content-type. These fields were called view, display and arguments. In my tpl.php I then embedded the news listing view inside a page, lets call it News. This way I gained great flexibility, and also helps the News page to know where it is located in menu structure.
Final comments
I have yet to discover if there are any drawbacks or dangers in doing this way, but if there are, feel free to share them with me :)
I tend to want to create my own modules, which create blocks and reference the database directly. Then I put the blocks inside of panels, this seems to be more flexible for me than using views and cck fields etc ...

Problem attaching Ubercart view to relevant content

Example page: http://giantcalculator.com/content/cartridge-filters
It’s very cumbersome to connect the ubercart view to a relevant content page. In the example above I have attached the view to the bottom; you can scroll down to see it. It is a tedius process though in which I have to create the view, then create a mini panel, include the view in the mini panel, then go to blocks page and add the mini panel to region (currently a region below the main content), then I have to configure the block so the view only appears on it’s one particular page.
This seems far too complicated and the particular region will soon have about 20 blocks inside it, though each only appearing on one page. Is there a better way to attach a view to its relevant content info, or vice versa?
I know the view creates a page of its own, and if I could add the content on top of the view that would be great. Or within the view itself, can the content be added somehow?
I'm almost ready to move forward with this site but I really need to find if there is a better method first. I'm posting this in a number of places and offering a $20 bounty via paypal to the first responder with best alternative that I end up using. (if there is one). Bounty may be shared if two or more people have the same response on different forums and I can't tell who was first, though when I do have an answer I'll promptly post it.
Other forums this will post include Drupal.org paid forum, Ubercart Bounty forum, aardvark, superuser and stackoverflow.
If I understand correctly, I think the piece of the puzzle you're missing is Views arguments. If you ever find yourself creating more than one view, where the only difference is the content (ie. based on taxonomy, or a certain CCK field), you probably want to use that as an argument in the view so it loads the correct content automatically.
I assume "cartridge filters" is a taxonomy term, and the page linked above is a node with this term applied. So you'd add a taxonomy arg to your view in the Views admin, and get it to pull the term from the current node. There are a bunch of tutorials out there on this, and here's a screencast: http://gotdrupal.com/videos/drupal-views-arguments
I'm also not sure why you're using mini panels. They're generally used for sets of blocks or other content to be displayed repeatedly, like a tabbed block or footer. It sounds like you just want a regular block display of the aforementioned view. You could also make this entire page a Panel.

Resources