I am using CPN to try to add custom css styling to individual nodes. The normal (default) node view works great and everything works as one would expect. I have then created a view that pull this content type and displays the node view as a slideshow (think content rotator). However, views isn't picking up the CPN css information that I have attached to the node and as such, will display the node correctly in the view. Using firebug, I can see that the view hasn't picked up the css file (in this case, 106.css) when it renders the veiw.

Wondering if anyone has a workaround for this? How does CPN inject the CSS? Can you have multiple CPN fields loaded at the same time (in the case of the slideshow, I might have up to 5 different slides, each with their own css code)?

Thanks

Comments

retrodans’s picture

I have the same request. Although I do wonder whether having this on automatically would cause issues. Maybe having the ability to enable this feature per view would be good, so supply it as a field to display in views maybe, which can be added as required?

Denal.Drupnis’s picture

Same for me. I use views and try to enter css for content type and for node. In public://cpn I found resulted css files but when rendering pages css files aren't included in html header. Is there something broken or do I need another module for include css and javascript from public://cpn?

Thanks

undertext’s picture

Status: Active » Needs review
StatusFileSize
new2.93 KB

Here is the patch, guys.

damienmckenna’s picture

Status: Needs review » Needs work

This shouldn't define Views as a dependency, and code needs some tidying to match the Drupal coding standards.

damienmckenna’s picture

It also needs to be extended to support the JS too.