Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# hammon 9/10/2007 7:58 PM
Hi, I'm new to Cuyahoga and asp.net programming in general. I'm developing a new module for cuyahoga mainly for learning this interesting framework.
I've a question: It's possible to have different views for a single module?

For example I need a different layout for the remote content module, but I'm restricted to only one layout.
Is the only solution to dev a different new module with different names etc...?


Thanks in advance.
# martijnb 9/11/2007 10:45 AM
You could also create an alternative ascx control for the view and point the value of the 'path' column in the cuyahoga_moduletype table to the new control.
# hammon 9/13/2007 4:10 PM
thanks you martijnb, that was the first solution I've tried, unfortunately I receive an error for a duplicate entry in the classname column.
If I understand well, changing also the class name of the module is uqual to develop a new module in term of "work".

Is there any VS template or something else way to built a new module easly? (ie. dummy module to be renamed/refactored is a bad idea?)

Best regards.
# hammon 9/24/2007 11:09 AM (edited 9/24/2007 11:22 AM)
Ok, I've tried to duplicate the remotecontent module. without any success. Duplicating tables for the module took some time, but now I'm stuck with an "An error occured: duplicate import: Feed" when I try to add a new section for the module.
Probably I should change further vars/classname, but I'm sure this is not the way to use a different simple view/ascx in a module.
Any ideas?
# martijnb 9/24/2007 12:41 PM
I was under the impression that you wanted to add alternative views to an already existing module.
In the scenario where you duplicate an existing module, it's indeed better to name classes differently because otherwise you can get in trouble with the NHibernate configuration.
In theory it is possible to use classes with the same name with the auto-import=false setting in the mapping file but in my experience it's much more convenient to just rename the classes for the duplicated module.