I wanted to use this module as for a blogazine style posts similar to Wordpress' Art Direction plug in, so I needed to disable the loading of the stylesheets on anything but the full node view.

So I made a patch! Hope someone finds it useful.

Comments

joelstein’s picture

Status: Patch (to be ported) » Postponed

I'm afraid this will break styles for many users who do want CSS or JS on node teasers (or more specifically, for view modes other than "full"). However, I've got a plan brewing which will add much more flexibility to this module, and I'll add to my todo list to add a way to indicate which view mode a particular code snippet will use.

chi’s picture

Subscribe. It would be appreciated to have addtional checkbox «Display only on full node view» in node add/edit form.

SFlack’s picture

It's just a matter of checking $view_mode before loading CSS/JS, and adding a checkbox style option, I would assume? I've already done the first bit as my site only needs it in full views currently.

damienmckenna’s picture

Title: Don't load css or js on node teasers » Control which view modes the CSS/JS are loaded on
Status: Postponed » Active

This should be done as either:

  • Checkboxes to control which view modes the CSS/JS are displayed on.
  • Different CSS/JS fields for each view mode.

I suspect the first option would be easier.

damienmckenna’s picture

Marked #1589138: Search Results page as a duplicate.

damienmckenna’s picture

Issue summary: View changes
Status: Active » Needs review
Parent issue: » #2154975: META: Plan for 7.x-1.5 release

Lets review this. It'll probably need to be rerolled, but I want to include it in the next release.

Status: Needs review » Needs work

The last submitted patch, cpn-display_on_full-01.patch, failed testing.

damienmckenna’s picture

Issue tags: +Needs backport to D6
damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new4.3 KB

This appears to work. It adds a new "View modes" option to each content type settings page, that defaults to "Full content" and "Teaser".

damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

damienmckenna’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Status: Fixed » Patch (to be ported)

Ready for backporting to D6.

damienmckenna’s picture

Version: 7.x-1.0 » 6.x-1.x-dev
damienmckenna’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Patch (to be ported) » Closed (fixed)
Issue tags: -Needs backport to D6

The D6 version of this module is no longer supported, so I'm closing this issue.