Доброго времени суток.
Прошу помочь с примером.
Есть модуль node_form_template
Не могу понять как правильно сделать шаблон.
Если не сложно направьте на путь истинный на примере формы регистрации.
Заранее благодарен.
Друзья тоже любят читать интересные статьи
Комментарии
В этом модуле есть файл node_form.tpl.php. Он и представляет собой шаблон редактирования формы. Положите этот шаблон к себе в корень темы и меняйте его как угодно - будет вам счастье :) Только кэш не забудьте почистить.
В этом же файле есть и список доступных переменных для шаблона (на русский переводить поленился, но там и так всё понятно):
/* * Primary variables: * - $author: The rendered field for assigning the author of the node * - $options: The rendered field for assigning administrative options on the * node, such as whether it's published or not. * - $buttons: The rendered buttons (save, preview, delete). * - $title: The rendered field for entering the node's title. * - $XXXX, $YYYY, ...: The rendered output for each top-level field or fieldset. * These depend on the node type and installed modules. For example, if the CCK * module is being used, and a field 'field_xyz' is part of the node being edited, * then the variable $field_xyz would contain the html code for entering data into * that field. * - $form_ids: HTML code needed for the internal functioning of the form. If not * outputting $standard (see notes below), then this variable needs to be output, * or else the form won't function correctly. * * Combination variables: * - $standard: Combines $form_ids, $title, and node-type and module-specific * entry fields. Essentially, everything on the form except the author field, * the options field, and the buttons. * - $admin: Combines $author and $options (see note about this variable below). * * Other variables: * - $node: Full node object. Contains data that may not be safe. * - $type: Node type, i.e. story, page, blog, etc. * - $form: The FormsAPI array defining this form. Contains data that may not be safe. * - $form['#rendered_content_children']: (see note about this variable below). */
Комментировать