1

Because of some reasons I am not able to change the view of teaser of my content type using drupal's UI, so I have to immediately force drupal to show images of contents of one of my specific content types in teaser. So, Is there anyway to do it by editing a table of it's database or someone could give me a better idea? Thanks in advance \M/

acrosman
  • 12,814
  • 10
  • 39
  • 55
  • Are the reasons related to Drupal not working correctly or business rules of some kind? If it's the first, you'll want to fix those first. Also which version of Drupal are you using? – acrosman May 27 '16 at 19:05

1 Answers1

0

You can override the node's template files in the site's theme. A full description of Drupal theme overrides is a large topic, and is version specific but hopefully this is enough to get you started down the right path.

Drupal provides a series of naming suggestions for various templates you can use to override default behaviors (and your own code as well). In Drupal 7 would should be looking for node--[content-type-name]--teaser.tpl.php or node--[content-type-name].tpl.php and then add conditional for the various display modes.

See also: the Drupal community documentation on node.tpl.php

acrosman
  • 12,814
  • 10
  • 39
  • 55
  • Thanks. Actually I desired to do it through editing it's database, but sounds like their offered method is the safest way and I'm going to obey them. Thank you. –  May 27 '16 at 23:31
  • 1
    You do not want to modify the Drupal database directly. That will cause unexpected results over time. – acrosman May 29 '16 at 17:21