Description of the need
We have an existing block NodeBlock that allows pointing at any arbitrary node as a block by its Node ID. I have a situation where the best way to use layouts may be to render the same node multiple times on the same page, each with different display modes. For example I have a banner area at the top of the page, as well as the main content area that is a wide column. I want to display a "banner" display mode in the banner area in addition to the "full page' display mode used in the main content block.
Proposed solution
Introduce NodeCurrentBlock class that can render the node. This block would have the required context of node so it would only show up on node/% path layouts (or other layouts with a Node context).
Recent comments
In a blog post titled "Github Tips and Tricks for Contrib Maintainers", I'd like to see some of the following topics: When is the README sufficient for documentation? When should...
Github Tips and Tricks for Contrib Maintainers
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout