Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Degrade 3/13/2007 5:43 AM
Hi Guys,

I was just wondering if it is possible to create a module management section for modules that have global content.

What i mean by global content is things like news articles and file downloads (whos contents are the same for every module of the same type). How i understand it at the moment, a module would need to be added to a page and then edit that module, however i would like for modules like this to be editable from the main menu (not requiring a user to find a page with that module first)

Is this possible with Cuyahoga? or does anyone have any advice on how to do this? I would also like it to be controlled by roles if possible, so only a newsEditor can edit news stories etc

Any help is appreciated

Matt
# mgaerber 3/13/2007 2:16 PM (edited 3/13/2007 2:17 PM)
Hi,

every module itself controls the editing/rendering of content.

You would have to extend the module in question (e.g. ArticleModule) and allow for a setting (e.g. with section settings) that does prevent the module from filtering its content according to the current section.

If you look at the code, there are queries like
		
public IList GetAllArticlesBySection(Section section, SortBy sortBy, SortDirection sortDirection)
		{
			string hql = "from Article a left join fetch a.Category where a.Section.Id = :sectionId " 
				+ GetOrderByClause(sortBy, sortDirection, "a");
			IQuery q = this._sessionManager.OpenSession().CreateQuery(hql);
			q.SetInt32("sectionId", section.Id);
			return q.List();
		}

Just add a non section aware method in contrast to the method above and provide a way to let the module know what to fetch