Forum


HomeHomePublicPublicDevelopmentDevelopmentSPA module Skin ProblemsSPA module Skin Problems
Previous
 
Next
New Post
9/14/2016 1:29 AM
 

Hi

I am starting to develop a SPA application

 

I am creating a simple List and a details view.

I created a new file called YoemanMVCEdit.html and added in the Manifest file.

The file Looks like.

 

 <moduleControls>

         <moduleControl>

          <controlKey />

          <controlSrc>DesktopModules/MVC/purplecs/YoemanMVC/YoemanMVC.html</controlSrc>

          <supportsPartialRendering>False</supportsPartialRendering>

          <controlTitle />

          <controlType>View</controlType>

          <iconFile />

          <helpUrl />

          <viewOrder>0</viewOrder>

         </moduleControl>

          <moduleControl>

            <controlKey  >List</controlKey>

            <controlSrc>DesktopModules/MVC/purplecs/YoemanMVC/YoemanMVCDetails.html</controlSrc>

            <supportsPartialRendering>False</supportsPartialRendering>

            <controlTitle />

            <controlType>View</controlType>

            <iconFile />

            <helpUrl />

            <viewOrder>0</viewOrder>

          </moduleControl>

          <moduleControl>

            <controlKey  >Edit</controlKey>

            <controlSrc>DesktopModules/MVC/purplecs/YoemanMVC/YoemanMVCEdit.html</controlSrc>

            <supportsPartialRendering>False</supportsPartialRendering>

            <controlTitle />

            <controlType>Edit</controlType>

            <iconFile />

            <helpUrl />

            <viewOrder>0</viewOrder>

          </moduleControl>

        </moduleControls>

 

 

I am having a link from YoemanMVC.html to YoemanMVCDetails.html

the link looks like

 

http://dnndev.me/Home/ctl/List/mid/422/ProfileID/2

 

The redirection works but uses the default site skin.

I need to change the skin of YoemanMVCDetails.html page

Is there any way to do this?

 

Thanks in advance

 
New Post
9/14/2016 5:12 AM
 

Hi,

Navigating through a module controls results on using the default "Edit" skin set to the site. As far as I know the only way to change that is to set a different skin for the "Edit Theme"  option under Admin/Site Settings.

Best regards,

Aderson

 
New Post
9/16/2016 1:04 AM
 

Hi Aderson Oliveira,
I normally use this code snippet to insert a ascx file with controlKey file into the default view ascx file.

This way I can use the view skin on the ascx files with controlKey.
 
I was just wondering if there is a method similar to this on MVC/SPA templates.

 

protected void GetModule()

        {

            try

            {

                //Get the control key passed in by the query string

                //if no key is present load the default view control

                string controlKey;

                if (Request.Params["cid"] == null)

                    controlKey = "QuizForm";

                else

                    controlKey = Request.Params["cid"];

 

                //Get the module path and load the control

                string mPath = getModulePath(ModuleId, TabId, controlKey);

                var objModule = (PortalModuleBase)this.LoadControl(mPath);

 

                objModule.ModuleConfiguration = this.ModuleConfiguration;

 

                //When you load a control in a control you lose the path to the the resource

                //file so need to tell the module which resouce file to use.

                objModule.LocalResourceFile = this.LocalResourceFile.Replace("Dispatch", controlKey);

                this.Controls.Add(objModule);

            }

            catch (Exception ex)

            {

                Exceptions.ProcessModuleLoadException(this, ex);

            }

        }

 

        private string getModulePath(int moduleid, int tabid, string controlKey)

        {

            string path = String.Empty;

            try

            {

                //step 1. get the moduledefid based on the moduleid and tabid

                ModuleController mc = new ModuleController();

                ModuleControlController mcc = new ModuleControlController();

 

                ModuleInfo mi = mc.GetModule(moduleid, tabid);

                if (mi != null)

                {

                    //step 2. using the moduledefid get the module control records

                    var mControl = ModuleControlController.GetModuleControlByControlKey(controlKey, mi.ModuleDefID);

                    if (mControl != null)

                        path = "~/" + mControl.ControlSrc;

                }

            }

            catch (Exception ex)

            {

                Exceptions.ProcessModuleLoadException(this, ex);

            }

            return path;

        }

 
New Post
9/16/2016 4:26 AM
 

Very goo question to Scott. I will forward it to him.

Cheers,

Aderson

 
New Post
9/16/2016 4:48 AM
 

Thank you

 
Previous
 
Next
HomeHomePublicPublicDevelopmentDevelopmentSPA module Skin ProblemsSPA module Skin Problems



Try FREE
30 days money back guaranteed