• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Partial fix CSS Templates with same name show as if included

Russ

Well-known member
#1
Possibly intentional... and possibly posted before, but it just seems inconsistent to me unless I'm looking past something.

bug1.png

This screenshot shows custom_footer.css as if it's being called already via customer_footer, however it's clearly not. Any template in which you have the same name for the CSS template will do this.

Just seems like the "customer_footer.css" shouldn't be showing unless I actually require the template.
 

Mike

XenForo developer
Staff member
#5
It was intentional. I think it's mostly for the CSS that is always included, but this is an edge case -- I think header is the only one missing an edithint for header.css. I agree it can be misleading.

As such, I've removed this behavior.
 

Mike

XenForo developer
Staff member
#6
Hmm actually, I just realized the other situation is for loading "tertiary" templates.

For example, when you open PAGE_CONTAINER, it loads all the templates included in it (like header), but it doesn't analyze those templates. It does, however, automatically load corresponding CSS templates (header.css).

Not sure I want to remove that advantage...
 

Russ

Well-known member
#7
Hmm actually, I just realized the other situation is for loading "tertiary" templates.

For example, when you open PAGE_CONTAINER, it loads all the templates included in it (like header), but it doesn't analyze those templates. It does, however, automatically load corresponding CSS templates (header.css).

Not sure I want to remove that advantage...
I'd prefer it to stay then :D, I think this is the first time it's ever been brought up on the forums that I could find, so wouldn't want to remove that advantage.
 

Jon W

Well-known member
#8
Wouldn't the solution be to always include CSS templates with the same name if they exist and not have to explicitly include a <xen:require> tag?
 

Mike

XenForo developer
Staff member
#9
Wouldn't the solution be to always include CSS templates with the same name if they exist and not have to explicitly include a <xen:require> tag?
Sort of, but it's not really feasible to detect that in the short term.

I'm making a small tweak here, but I'm mostly keeping the automated behavior when getting second level templates. For the primary template, we no longer automatically appear to include the CSS template.