drupalcamp kyiv 2011. views - стандарт вывода списка данных....
TRANSCRIPT
Views - . Views -
DrupalCamp Kyiv 2011
Views , !?
PHPDrupalViews
!
PHP, MySQL. .
!
Views
. .
. Views.
.Blocks(), Panels().
Blocks(), Panels()
Views
,
, Views.
Views.
, Views, Drupal: , , .
hook_views_api,
hook_views_plugins, .
.
.
.tpl.php.
:
, module.info
...files[] = s5_views_styleplugin_scrollbox.modulefiles[] = theme/s5_views_styleplugin_scrollbox.theme.incfiles[] = s5_views_styleplugin_scrollbox_plugin_style.handler.incfiles[] = s5_views_styleplugin_scrollbox.views.inc
s5_views_styleplugin_scrollbox.info
hook_views_api
function s5_views_styleplugin_scrollbox_views_api() {return array('api' => '3.0-alpha1', );}
hook_views_plugins, .
function s5_views_styleplugin_scrollbox_views_plugins() {return array( 'style' => array( 's5_views_styleplugin_scrollbox' => array( 'title' => t('Scroll Box S5'), 'help' => t('Display the results as a slideshow.'), 'handler' => 's5_views_styleplugin_scrollbox_plugin_style', 'uses options' => TRUE,'uses fields' => TRUE, 'uses row plugin' => TRUE, 'uses grouping' => FALSE, 'type' => 'normal', 'parent' => 'list', 'path' => drupal_get_path('module', 's5_views_styleplugin_scrollbox'), 'theme' => 's5_views_styleplugin_scrollbox_theme', 'theme path' => drupal_get_path('module', 's5_views_styleplugin_scrollbox') . '/theme', 'theme file' => 's5_views_styleplugin_scrollbox.theme.inc', ), ), );}
class s5_views_styleplugin_scrollbox_plugin_style extends views_plugin_style {// .function render() {...}// .function option_definition() { ...} // .function options_form(&$form, &$form_state) {...}}
Drupal .
>
>
>
jQuery(document).ready(function(){jQuery('.s5_views_styleplugin_scrollbox').s5_tinyscrollbar({'axis':'','wheel':'','scroll':'','size':'','sizethumb':'',});});
function option_definition() { $options = parent::option_definition(); $options['axis'] = array('default' => 'x'); ... return $options;} function options_form(&$form, &$form_state) {$form['axis'] = array('#type' => 'radios','#title' => t('Axis'),'#options' => array('x' => 'x', 'y' => 'y'), '#default_value' => $this->options['axis']==''?'x':$this->options['axis'],'#description' => t('vertical or horizontal scroller? "x" or "y" .'),);. }
Views c . HTML list
Views c
:
Starting Views 2 Documentationhttp://groups.drupal.org/node/10129
Views 2 - Writing plugins, handlers, and supporting new tableshttp://drupaldojo.com/session/views-2-writing-plugins-handlers-and-supporting-new-tables
Views 2( Starting Views 2 Documentation). http://vlikin.blogspot.com/2011/03/views-2.html
http://vlikin.blogspot.com/2011/06/drupalcamp-kyiv-2011-views-views.html
:
, , .: vlikin.blogspot.com: [email protected]
Muokkaa otsikon tekstimuotoa napsauttamalla
Muokkaa jsennyksen tekstimuotoa napsauttamallaToinen jsennystasoKolmas jsennystasoNeljs jsennystasoViides jsennystasoKuudes jsennystasoSeitsems jsennystasoKahdeksas jsennystasoYhdekss jsennystaso