Partial View in Package - Javascript and CSS

43 views
Skip to first unread message

bengr...@googlemail.com

unread,
Nov 5, 2015, 3:07:13 PM11/5/15
to Umbraco development
I'm including some partial views in a package that I'm creating, and each of them has their own CSS and Javascript files. When the client imports the package in to their Umbraco project, what's the best way (without the client having to do anything) of referencing these files? There may be several of the same partial view on the same page, so I don't just want to include the import statements within the partial itself, as that would register the same scripts and CSS files for every instance of that partial on the page.

What is the best way of including these files in the project without the client having to add the import statements to their Masterpage?

Ryan Lewis

unread,
Nov 6, 2015, 4:24:21 AM11/6/15
to umbra...@googlegroups.com
You want to make sure you are including your JS and CSS that the browser needs in your package.manifest file.


On 5 November 2015 at 20:07, <bengr...@googlemail.com> wrote:
I'm including some partial views in a package that I'm creating, and each of them has their own CSS and Javascript files. When the client imports the package in to their Umbraco project, what's the best way (without the client having to do anything) of referencing these files? There may be several of the same partial view on the same page, so I don't just want to include the import statements within the partial itself, as that would register the same scripts and CSS files for every instance of that partial on the page.

What is the best way of including these files in the project without the client having to add the import statements to their Masterpage?

--
You received this message because you are subscribed to the Google Groups "Umbraco development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umbraco-dev...@googlegroups.com.
To post to this group, send email to umbra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/umbraco-dev/fbaf560e-a073-4899-85e1-654498f7ca1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Ryan Lewis    |    Senior Developer
www.epiphanysearch.co.uk
@epiphanysearch

D : 0113 202 1477     |     T : 0800 019 9727

The Small Mill 
Chadwick Street 
Leeds LS10 1LJ



Proud to be a Jaywing company
www.jaywing.com



Support our charity of the year 
www.janetomlinsonappeal.com

Registered in England and Wales at Players House, 300 Attercliffe Common, Sheffield, S9 2AG. Company number 05326242. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Reply all
Reply to author
Forward
0 new messages