How to get the name of the current page’s parent from the menu (i.e., get the title of the page one level up) in Joomla 1.5:
$menu = JSite::getMenu();
$parent = $menu->getItem($menu->getActive()->parent)->name;
$menu->getActive()->parent returns the id of the parent, which is why you then have to pass that id to
$menu->getItem([id])->name. It would be nice to have a
parent() function so that you would only need
$menu->getActive()->parent()->name, but I quibble.
Photo: University of Washington Libraries Digital Collections, via Flickr Commons
With Arianna Huffington’s recent article “Museums 2.0: What Happens When Great Art Meets New Media?” we’ve seen yet another turn of the wheel that Edward Rothstein started rolling with his New York Times piece “From Picassos to Sarcophagi, Guided by Phone Apps.” Though Rothstein and Huffington have run considerable risk of being dismissed as, let’s say, “elders who just don’t get it,” all the responses I’ve seen, such as those from Nina Simon and my old colleague Shelley Bernstein (Hey, Shelley!), have engaged their criticisms thoughtfully while holding the line that they don’t, in fact, get it.
I’ve been frustrated over the years with Rothstein’s coverage of exhibitions and his lack of interest in anything interactive, but I’d like to suggest he is starting to get it. Appreciating this suggests some formulas for giving people more of what they want.
Setting up Apache in Ubuntu and can’t get mod_rewrite to work? You’re sure the module is enabled and a simple test rewrite rule, that you’re positive is correct, is in your .htaccess file?
Are you using the default configuration that comes in recent versions of Ubuntu, /etc/apache2/sites-available/default, or did you copy it to create your own configuration? One little change may cure all your ills.