I created a multimedia component for css and js and attached these on page Template building block and when I browsed my publish page my css are not going to load how css and js are loaded on publish page.
give me solution?
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.Sign up to join this community
Try to Use css and js like below in your TBB:
<link href="tcm:xx-xxxx" rel="stylesheet" type="text/css" />
Please refer to the answer by Nuno Linhares:
The solution we ended up using was "Publish Design Elements", which is part of Will Price's Generic TBBs. You can get it here:
If memory serves correctly, you create a folder structure in your design publication, say
020 Global Design > Design Elements > css > cssimages and store your CSS as a multimedia component.
Then, in your structure publication, you create structure groups to mirror that, e.g.
040 Global Web > css > cssimages (creating one structure group for each folder).
Create a single page in the
css folder and pass a parameter to the TBB with the location of the design elements, and it'll take care of the rest.
There are probably more complete instructions in the TBBs, but the key point is that the structure group structure must mirror the folder structure including children.
It's a handy tool.