Although Webform module comes with limited integration to expose the submitted data in Views, it lacks the fine control to make View by Webform field as rows and columns. There is a workaround to achieve this though which I would like to briefly run through in this blog.
Webform MySQL Views together with Data and Schema modules with a patch to Webform MySQL Views from issue #889306: Allow the designation of a primary key for MySQL views makes this feasible.
Webform MySQL Views, as the name implies, allow us to create MySQL view from Drupal, leveraging the Data module which counts on Schema module.
Data module wraps a bundle of sub-modules, among them Data Search provides Views Integration and Data Admin UI for accessing its administrative pages.
Once the mentioned modules are enabled. You can see a sub-menu "MySQL Views" under Administration » Content » Webforms. Tick the Webform node whose fields are needed in Views. This form is only meant to create MySQL view.
WYSIWYG (a.k.a HTML Editor) has become a De facto for quickly formatting and publishing contents from dynamic site like Drupal. This is certainly a time saver and prevents from getting hands dirty with HTML.
In this connection, CKEditor has been a pioneer and around in use and development cycle for a decade (first release was on March 2003, in the name FCKeditor).
This solid and interesting tool plays good with Drupal content publishing system via Wysiwyg module. The recent CKEditor, version 4.2.x brings something more interesting to our desk. I'm talking about
Templates plugin in specific.
Note: As of now this version of CKEditor requires dev version 2.x-dev of Wysiwyg contrib module.
Our project requirements were to create a Newsletters sending site with Drupal as base. (Having admired by Mailchimp, I considered this project as a trimmed version of the same).
- Template file to display a page's output in Drupal
- This file contains a combination of php and html tags
- To render the content, we need to use the PHP variables. For list of available variables, see handbook page
- Simply called as a preprocess function, defined in template.php of active theme
- Essentially used to add/alter variables before they are rendered in the template file
- To use, replace "hook" with module or theme name and "HOOK" with 'page','html' or 'block' as needed
- In your case, this will be "my_theme_preprocess_page" since page template should be altered
Creating separate page.tpl.php:
Let come to the heart of the topic, by reading the above explanations you would have obtained a pinch of salt about the real scope in using page.tpl.php and hook_preprocess_HOOK.
Now do the following:
In active theme's template.php file add the below hook_preprocess_page() implementation,