4

We are using Tridion 2013 SP1 + DXA.

What is the significance of adding the HTML Design Configuration component link to the Core component (located at \Building Blocks\Modules\Core\Admin)?

For HTML design to work, we make our changes in HTML Design Configuration component and then publish the Publish HTML Design page. The Core component is nowhere in picture here.

The CT used along with this component is Publish HTML Design, and when I looked at the Publish HTML Design template, it is somehow configured to look into the core component.

 foreach (var module in modules)
            {
                var moduleName = module.Key;
                if (moduleName != "core")
                {
                    ProcessModule(moduleName, module.Value);
                }
            }
 ProcessModule("core", modules["core"]);

So if I create a new 'HTML Design Configuration' component for eg Custom HTML Design Configuration, I have to link this to the 'core' component anyway?

Or Suppose I create a new Core component Custom Core, I have to modify my code?

It will be good to know which all components are base of DXA and should not be replaced altogether.

1 Answer 1

4

When publishing the HTML Design, the logic is as follows:

  1. Load all components using schema Module Configuration where the isActive field value is Yes
  2. For each module (except for the Core), find the HTML Design Configuration component (linked via the designConfiguration component link field) and process it (extract the zip and build up some custom LESS code)
  3. Do the same for the Core (this is always the last module to process)
  4. Execute the grunt task to compile the HTML Design and publish the resulting assets as binary variants.

So to answer your questions:

What is the significance of adding the 'HTML Design Configuration' component link to the 'Core' component (located at \Building Blocks\Modules\Core\Admin)? - This linkage is used in step 2. above

if I create a new 'HTML Design Configuration' component for eg 'Custom HTML Design Configuration', I have to link this to the 'core' component anyway? - Yes

Suppose I create a new Core component 'Custom Core', I have to modify my code? - You cannot create a new Core component, as the name Core has a special meaning (as you can see from your code snippet).

So in summary, don't replace the Core component, but you can link in a different HTML Design Configuration component.

Note that the Core config component is also used to bootstrap the generation of all configuration (including module configuration) published via the Publish Settings page - so its pretty important.

1
  • Thanks Will. Further to this, there is a method(GetModuleNameFromConfig) to read and check the module name. This is returning : configComponent.OrganizationalItem.OrganizationalItem.Title.ToLower(); Which I see as a limitation. I think it should return the module name from component. Because suppose an Editor changes the folder name by mistake, the modules may not be processed. so use something like: fields.GetTextValue("name").ToLower(); Please correct me if I am wrong.. Jul 17, 2015 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.