Not a bug Profile Tab not load extra css

truonglv

Well-known member
As the title. In my template I have used this code:
Code:
<xen:container var="$head.something"><link rel="stylesheet" href="somewhere/somefiles.css"></xen:container>

And it is not loaded when I click into an tab in profile tabs.
 
It wouldn't be expected to, I don't think.

Profile tabs are loaded without the container (by virtue of how they are inserted) so I wouldn't expect the code to work.

xen:require would work though.
 
Yup. xen:required is work. But I can use for external CSS?
Assuming you mean an externally hosted CSS file, or indeed a locally hosted CSS file on the filesystem; no. But you could always host the CSS locally in the template system.

In many ways that's preferable due to it potentially making less HTTP requests and benefitting from any built in optimisations such as CSS minification.
 
Last edited:
We did a similar thing with the VideoJS library we added for XF 1.5.

It ships with a CSS file, but for convenience we just copy/pasted it into an XF template. It also makes it easier for users to adjust something in there if they need to, or even allow you to replace some of the styling with style properties/colour palette colours, etc.
 
It ships with a CSS file, but for convenience we just copy/pasted it into an XF template. It also makes it easier for users to adjust something in there if they need to, or even allow you to replace some of the styling with style properties/colour palette colours, etc.

(y)(y)(y) everything else is a "PITA" for designers.
 
Top Bottom