Partial fix CSS Templates with same name show as if included

Russ

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

bug1.webp

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.
 
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.
 
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...
 
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.
 
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?
 
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.
 
Top Bottom