My case is that we want to build a customizing Lab Module (show Basic Science Research) which provides a template to show each lab pages in consistent style. This module will also allow each lab's manager(non-developer) to update their own lab pages with some textbox, checkbox, upload file or image, TinyMce plain input elements(not html/css) after they login Orchard (or Developer directly provides them some links to update page infos without login, best not in Admin Dashboard). Each lab page will show Research, Project, Members, Publication, News Sections in front-end. My current plan is creating ResearchLab type (ResearchLabPart/ResearchLabRecord includes lab title, research_topic, research_image, research_protocol etc), Project type (ProjectPart/ProjectRecord includes title, start_date, foreign key researchLab_Id etc), Member type(MemberPart/MemberRecord include name, title, Linkedin links, foreign key researchLab_Id etc), Publication Type(Member/MemberRecord include name, title, Linkedin links, foreign key researchLab_Id and project_Id etc) etc. The foreign key is that once a researchlab id is chosen and based on this value, corresponding project, publication and news for specific lab could be queried as well right away. When lab manager updates the Researchlab part page, he/she wants to upload some research_image or protocol pdf, doc files. For ResearchLabPart (having lab_title, research_topic, research_image, research_protocol properties etc) and I could easily attach ImageField (assuming name ResearchLabImage) as OfType("MediaPickerField") or fileField(some external module) into ResearchLabPart in Migration.cs after enabling these two external modules. In the ResearchLabController of my custom module, Edit Action will view link to a return model=_contentManager.BuildEditor(ResearchLab) which will go to EditorTemplates--Parts--ResearchLab.cshtml. I want to assign the url (or file/image's name values, using ((dynamic)Model.ContentItem).ResearchLab.ResearchLabImage ) into research_image, research_protocol properties of ResearchLabPart. It looks like I need to implement assigning values in Eitor method of LabMemberDriver, not sure? My target is to let file or image fields to save files and images in some folders under my module directory and save the files or images's name or url path into photo, cv properties of LabMemberPart. Am I going to right direction? How to connect and exchange image/file fields to the properties of ResearchLab part in source code part? Any thoughts or comments are welcome. Thanks.
Asked
Active
Viewed 40 times
0
-
That all sounds way more complicated than it needs to be. What do you need that the media picker field doesn't do by default? – Bertrand Le Roy Jul 15 '19 at 06:27
-
@Bertrand Le Roy, Thank you for your comments. At the beginning, we tried to develop customizing field similar to media picker field and don't want to grant user to have admin access. Now we changed mind and chose media picker field to make thing easier. Thanks. – Tony Tong Jul 18 '19 at 18:52