Unified news area editable from multiple locations

Permalink
I've already got a Designer Block with a few tweaks to it working to pull news articles with a specific flag to different pages throughout my site, but I would like to be able to edit the actual news "master" page from any of the other news category pages. Does anyone know if it is possible to pull in that area to a category page when you are in edit mode to edit the master content from any of the news subsidiary pages?

aghouseh
 
jordanlev replied on at Permalink Reply
jordanlev
I'm not sure I completely understand what it is you want to do, but think I have the basic idea...

You could in the code of your page type template do something like this:
<?php
if ($c->isEditMode()) {
    $edit_cid = 77; //<--CID of the page containing the news things you want to edit
    $edit_c = Page::getByID($edit_cid);
    $a_edit = new Area('Main'); //<--name of the area containing the news things you want to edit
    $a_edit->display($c_edit);
}
?>

I'm not 100% sure this will actually work, but you can give it a try and see what happens. Also note that this isn't a "scalable" solution, because it requires you to hardcode the CID and area of the master page.

Instead of trying this, though, you might want to reconsider your approach to the problem. If you have news items on individual pages, but you want to edit them from one master page, you might be better off with a dashboard interface for managing those news items -- which you could build yourself by doing something similar to this tutorial:
http://www.concrete5.org/documentation/how-tos/developers/build-a-s...

Or you could purchase one of the News addons in the marketplace:
http://www.concrete5.org/marketplace/addons/easy-news/...
http://www.concrete5.org/marketplace/addons/simple-news/...
http://www.concrete5.org/marketplace/addons/pronews/...
aghouseh replied on at Permalink Reply
aghouseh
I'll mess around with that - looks like it might do what I'm looking for.

I am trying to stay away from implementing things into the dashboard, because this is for an ice hockey rink and let's just say that the clients are less than savvy. As much functionality as I can build directly into the "Edit Page" action, the better.

Thanks for your feedback, though. You always come through with super-helpful solutions and suggestions.