Joomla: dynamically adding stylesheets by category and section

I once had the misfortune of developing a Joomla site with three separate templates, each of which contained four separate color schemes. The color scheme needed to be selected based on the content's section and/or category.

This PHP script will cycle through various methods for determining category id, section id, or content id. It also includes an array for manually setting the stylesheet by id.

Views Accordion - Opening a specific row with a link

Goal: create link that goes to a new page and opens a specific accordion drawer.

Using the Views Accordion module in combination with a little custom code accomplished this. Here's a step by step guide.

Create your view

-add this header with input filter "php code": <?php $view = views_get_current_view(); $nid_arg = $view-> args[0]; ?> <?php if ($nid_arg): ?>

<?php print $nid_arg; ?>

<?php endif; ?>

-add a 'Global NULL' argument to the view.