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

Not a bug Profile Tab not load extra css

Nobita.Kun

Well-known member
#1
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.
 

Chris D

XenForo developer
Staff member
#2
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.
 

Chris D

XenForo developer
Staff member
#6
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:

Chris D

XenForo developer
Staff member
#8
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.
 

Freelancer

Well-known member
#9
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.