A site owner may not want the Premium teaser to be the same as the default drupal teaser. Drupal 7.x gives the option of creating custom teasers. Node Option Premium should create a teaser specifically as a Premium Teaser. If no settings are specified in the content display settings, then the default display settings will take place. Having this custom view mode will give site owners to determine what is displayed to non-premium users, but also how that content will be displayed. Custom Field widgets could be created (by a 3rd party) to display content in a specific way to non-premium users allowing an immense amount of flexibility.

Comments

davidwbarratt’s picture

Assigned: davidwbarratt » Unassigned
Status: Active » Needs review
StatusFileSize
new998 bytes

Here's the patch! :)

anrikun’s picture

Thanks!
Doesn't it need some hook_update_N() for migrating any existing default teaser settings to the newly added custom premium_teaser mode?

davidwbarratt’s picture

StatusFileSize
new2.07 KB

I added the update to copy the settings from the teaser to the premium_teaser. This should allow migration to the new type to happen smoothly and easily.

I also added a theme suggestion so the view mode can be themed independently. :)

I'm excited to see this committed!

anrikun’s picture

Status: Needs review » Needs work

Thanks again.
Just a detail: "premium_teaser" should be renamed to "nopremium_teaser" everywhere.

davidwbarratt’s picture

Status: Needs work » Needs review
StatusFileSize
new2.08 KB

Fixed! thanks!

davidwbarratt’s picture

Any update on when this might be commited?

thanks!
david barratt

davidwbarratt’s picture

StatusFileSize
new2.78 KB

Fixed a bug in the patch that passed $view_mode = 'teaser' to the theme. Instead, the proper $view_mode = 'nopremium_teaser' has been set and theme can handle the view_mode accordingly.

Updated Patch is attached.

thanks!
david barratt