×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: CMC module template override

CMC module template override 9 years 7 months ago #28077

  • Dan
  • Dan's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Hi there, I wonder if somebody could help me out. I have updated the plugin to the latest dev build after losing the "Module Class Suffix" option as noted here :
https://compojoom.com/forum/cmc-mailchimp-for-joomla/19592-problem-with-1-4-to-1-5-update#27458 but I also having trouble using a template override that was working prior to the update to v1.5. I don't seem to get the option to select my overriding template from within the module any more.

Any help is much appreciated,
Regards,
Dan

CMC module template override 9 years 7 months ago #28083

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Dan,
What do you mean from within the module? Also make sure that you update your template override, as the default template file in the module has changed quite a bit. (if you were using any other version than 1.5 in the past)

Regards,
Daniel

CMC module template override 9 years 7 months ago #28085

  • Dan
  • Dan's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Hi Daniel,
Thanks for the quick response.
Apologies, I was referring to using a module layout override for mod_cmc within my site template folder.

I was expecting to see an "Alternative Layout" dropdown on the "Advanced" tab after setting up a CMC module within the Joomla! module manager. This would let me choose from available templates in the folder below :
/templates/[template_name]/html/mod_cmc/

I have created a new template based on the 1.5 version to test with which is now in the same overriding folder (the path above) in my template, but I still don't see any option to select the template I've created. Sorry if I'm missing something obvious :blush: :whistle:

Regards,
Dan

CMC module template override 9 years 7 months ago #28106

  • Dan
  • Dan's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Just to follow up on this, I have resolved my issue by adding the field I was looking for into the mod_cmc.xml in the following place and editing mod_cmc.php
[site root]\modules\mod_cmc\mod_cmc.xml
[site root]\modules\mod_cmc\mod_cmc.php

In mod_cmc.xml I added the following at the start of the <fieldset name="advanced"> node :
<field name="layout"
       type="modulelayout"
       label="JFIELD_ALT_LAYOUT_LABEL"
       description="JFIELD_ALT_MODULE_LAYOUT_DESC"/>
<field name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
       description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"/>

And in mod_cmc.php I added the following at line 20 - 21 (commented out the original line) :
//$layout = 'default';
$layout = $params->get('layout', 'default');

This will add the the "Alternative field" dropdown onto the modules advanced tab.
@Daniel, any chance this could be added to the next release? :)

Thanks again for a great plugin,
Dan
  • Page:
  • 1
Time to create page: 0.113 seconds