Jeff VIP
Total posts: 745
17 Feb 2016 05:18

Hi,

I was wondering how to style the Mail successfully sent notice. It seems the iframe that contains this message only loads bootstrap.min.css and not the css of my template.

Mail sent notice

Best regards, Jeff

Last Modified: 01 Jun 2016


Sergey
Total posts: 13,748
18 Feb 2016 08:35

This is component.php in your template. Add there load of your CSS.


Jeff VIP
Total posts: 745
18 Feb 2016 12:56

Unfortunately I can't override component.php with my YooTheme template :-(


pepperstreet VIP
Total posts: 3,837
19 Feb 2016 01:08

Jeff Unfortunately I can't override component.php with my YooTheme template :-(

Yep, always thought this is specific to WARP ;)

But this seems to be impossible in Joomla core in general. Bummer, it is a "feature-bug".
component.php, error.php, offline.php have their original in templates/system/...
If there is a file in YOUR-template, it is already some sort of override. :(

You can either modify that file (not save on template updates).
Or try to override the actual call. I mean, the link where it is used in Cobalt.
You could make a copy and rename it to mycomponent.php, change link accordingly...


Jeff VIP
Total posts: 745
22 Feb 2016 23:29

pepperstreet Or try to override the actual call. I mean, the link where it is used in Cobalt.

You could make a copy and rename it to mycomponent.php, change link accordingly...

Thanks pepperstreet. Do you know which Cobalt file I have to alter?


pepperstreet VIP
Total posts: 3,837
23 Feb 2016 09:06

Hello Jeff, I think the email field's output template is reponsible for the URL with component.php

/YourJoomla/components/com_cobalt/fields/email/tmpl/output/default.php


If you choose to alter the component.php ... what about giving it special file-permissions? If there is no write access, it might be save on template updates.


Jeff VIP
Total posts: 745
24 Feb 2016 04:37

pepperstreet Hello Jeff, I think the email field's output template is reponsible for the URL with component.php

/YourJoomla/components/com_cobalt/fields/email/tmpl/output/default.php

Unfortunately I see no reference to component.php here.

pepperstreet If you choose to alter the component.php ... what about giving it special file-permissions? If there is no write access, it might be save on template updates.

Yes, good advice. I have added a new reference to component.css in templates/MY-TEMPLATE/component.php which seems to work. I've also created a zip file of the altered component.php so I can extract it after any accidental update.


pepperstreet VIP
Total posts: 3,837
24 Feb 2016 05:24

Jeff Unfortunately I see no reference to component.php here.

"Use the search, Luke! ...err... Jeff!" ;)


It should be found in line #37

$url_form = JRoute::_('index.php?option=com_cobalt&view=elements&layout=field&id=' . $this->id . '&section_id=' . $section->id . '&func=_getForm&record=' . $record->id . '&tmpl=component&Itemid=' . $this->request->getInt('Itemid').'&width=640', FALSE);

Quick test with WARP7 Master. Loading MyComponent.php and theme.css from template folder.

cob_field_email_output_template_custom_component-php


Jeff VIP
Total posts: 745
24 Feb 2016 08:00

Ahhhhh, I see!

"Much to learn, I still have"

+1


pepperstreet VIP
Total posts: 3,837
24 Feb 2016 23:18

"You must unlearn what you have learned." ;)

Powered by Cobalt