Using custom templates in modules

I am wantingto make some css changes for the videos module. I already have a custom template named tmpl_mts in the templates directory. I was under the impression that I would need to also create a folder called tmpl_mts in the modules/boonex/videos/templates directory - which I did. under the normal rules of creating a custom template, I would create my css page with the changes needed, which I did. I created a new page called view.css in my modules/boonex/videos/templates/tmpl_mts folder. On this page, for now, I have simply the following:

@import url(../../base/css/view.css);

.fileUnitInfo {
  display: none;
}

I have cleared all caches, including browser cache, and still my changes are not taking effect. I even manually cleared my cache and public_cache folders. I am using 7.1.4. I have looked for similar posts, in which I did find one, but the answer is what I have already done, so I am at a stand still here. Any help would be greatly appreciated. Thanks in advance.

caredesign.net
Quote · 26 Sep 2013

I'm not sure what might be different about my custom template....

BUT, as a comparison, I looked at one of my custom templates (hypernova) in the /modules/boonex/videos/templates/hypernova/css/view.css

It did not have in the view.css file- @import url(../../base/css/view.css);

I was actually surprised and assumed that line would be there, but it is not.

Have you tried yet without adding that?

Quote · 26 Sep 2013

I am still learning about templates in the modules.  I was under the impression that it worked off of the site template.  For example, if you have a site template, tmpl_MyNiffyTemplate and have one for the modules, then the module would have a template with the same name, say /photos/templates/tmpl_MyNiffyTemplate so when you choose that template for the site, it uses the same named template for the modules.

Geeks, making the world a better place
Quote · 26 Sep 2013

@import imports the entire css from another stylesheet.  According to modern standards, @import should not be used; it was mainly something to make IE work.

Geeks, making the world a better place
Quote · 26 Sep 2013

@Underdog, i removed the @import and cleared all caches - including browser cache, and still no luck - totally has me puzzled

@GG - if you look at the alt template - those include the @import - cause even with your explanation, I still need to pull in the original css page for all the rest of the stuff. And I too was under the impression that I would need a tmpl_mts in the videos module if I made any changes specific to the video pages. So puzzled here as well.

caredesign.net
Quote · 26 Sep 2013

 

@Underdog, i removed the @import and cleared all caches - including browser cache, and still no luck - totally has me puzzled

@GG - if you look at the alt template - those include the @import - cause even with your explanation, I still need to pull in the original css page for all the rest of the stuff. So puzzled here as well.

There is no need to use @import; just include the full CSS file in the template and add your bits to the end of it.  If the template engine finds the same stylesheet as in the base, it ignores the stylesheet in the base and uses the one in the template.

Geeks, making the world a better place
Quote · 26 Sep 2013

@underdog - looking at your file structure you posted, is it possible i have my template labeled wrong in the videos module folder. in your post you have /modules/boonex/videos/templates/hypernova/css/view.css - instead of
/modules/boonex/videos/templates/tmpl_hypernova/css/view.css

caredesign.net
Quote · 26 Sep 2013

What you did should work. Or at least that's how it's dolphin for dolphin 7.0.9 and lower. Before they changed the template design. Now i have to do some tests to see if that has changed.


GG. Maybe not modern standards, but @import is used by dolphin to import all of the current styles and then the style sheet would only have to contain what your over riding. If @import is not used then all of the styles would have to be included.

But who knows. 7.1.x may have changed and perhaps it's no longer done that way. I have to check when i have some time.

Thats why i stopped making templates when 7.1 was released. It was already bad enough keeping up with the constant changes boonex was making with the forums that would break templates. When they changed everything when 7.1 was released i threw my hands up and said "Ok, enough of this crap. I am done with templates". Then i pulled all my templates from the market. I was not about to start over creating new templates from scratch because they decided to change the entire template system.




https://www.deanbassett.com
Quote · 26 Sep 2013

@GG - I have seen instances where copying the original css file to the template has caused things to not work properly. but I had an issue where i used the @import for the forms_adv.css page and they did not take effect no matter what i did, so i ended up copying the whole page into my template and not using the @import. So I do understand how it could work, but with some of the posts I have seen in the past, there is room for errors.

I could simply make the needed changes to the default view.css, but I am also trying to learn how to make custom templates, so thought it would be better to retain the structure that I have seen used in the past. But I did not know (as Deano stated) that the template things have changed, so I am using pre 7.0.9 standards. Which may very well be my problem.

caredesign.net
Quote · 26 Sep 2013

All I know is that new standards for web development are saying No to @import.  @import can also make handling style sheets messy; especially if you import several and then things can start overriding things and you have an arse of a time tracking it down; or at least in the earlier days.  In the CMS project that I help with, we have decided to rip out all the @imports in the templates and follow the newer guidelines.

I am not really up on Dolphin templates; I can play around with the stylesheets and templates a bit but that is about it.

Geeks, making the world a better place
Quote · 26 Sep 2013

 

Just or its and giggles, I copied the original view.css file and pasted it into my new templates css folder, and made the one change - even this does not work after clearing all caches.

caredesign.net
Quote · 26 Sep 2013

Oh yes, the whole template engine for Dolphin 7.1 is different; which is why template developers had to rush to update.  A 7.0.9 template will not work on Dolphin 7.1.  I thought there was a wiki on this.  Let me go check.

Geeks, making the world a better place
Quote · 26 Sep 2013

Update: that link is rather worthless.  Come on Andrew.

 

OK, look at this:

http://www.boonex.com/forums/topic/Dolphin-7-1-changes-for-Template-Developers.htm

Geeks, making the world a better place
Quote · 26 Sep 2013

Here is part of a video tutorial but I think most are just saying to mess around with the uni template instead of actually teaching you how the 7.1 template engine works.

http://www.youtube.com/watch?v=mCV6gqzjl64

Geeks, making the world a better place
Quote · 26 Sep 2013

 

/modules/boonex/videos/templates/tmpl_hypernova/css/view.css

 /modules/boonex/videos/templates/tmpl_hypernova/css/view.css would be correct....

Crazy thing is....I've gone back into the /modules/boonex/videos/templates on my Live and Demo Site, and find only the BASE....

I have no idea where I looked to offer you that comparison now....

I just check on my PC-

modules/boonex/videos/templates/tmpl_blackmagic4/css/view.css

That template shows the same as I told you before- it has no line for importing css from the Base

This really doesn't help ya though....Sorry

Quote · 26 Sep 2013

One if the things i noticed, and i ran into it yesterday on a site i was working on.

There are 3'rd party proxy and caching services such as Cloudflare that will cache css files. They are a royal pain in the neck. I change css files, but no change. Come to find out, that 3'rd party service was caching and serving up the old file instead of the new one.

https://www.deanbassett.com
Quote · 26 Sep 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.