Posted by rconstantine on July 18, 2012 at 5:36pm
7 followers
Jump to:
| Project: | Views data export |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have defined a title and a header for a particular view. Neither is output, only the fields are output and they show up as a table (even in a DOC).
How can I get the output to look like the page view I have which has:
TITLE
HEADER TEXT
Label1: Field1
Label2: Field2
...
LabelX: FieldX
Comments
#1
I'm not sure but I'm having the same issue. I think its a theming template issue but I am still a noob.
The default views template of the header area looks like this
see views-view.tpl.php line 36
<?php if ($header): ?><div class="view-header">
<?php print $header; ?>
</div>
<?php endif; ?>
But this module's theming calls the $header and $footer variables to add the wrapping elements around the body.
see views-data-export.tpl.php
<?php print $header ?><?php print $body ?>
<?php print $footer ?>
This template is used on every data export type. I think the solution might be to break the wrapping elements off of into separate .tpl.php files for each data type. Then ensure the $header variable is being passed the normal data and place it within a conditional statement with a validator to ensure the data being rendered won't break the format.
But again I'm still a noob.
#2
Also I am using 7.x-3.0-beta6
#3
You should be able to use the header specific template:
views-data-export-doc-header.tpl.phpto change the header output of a DOC export.#4
Automatically closed -- issue fixed for 2 weeks with no activity.
#5
I have the same problem. the Views header and footer are not output
To address this issue, I used the $static variable to output a header with the first row - adding a php customfield with this code:
<?phpif (!isset($static)) print "your header";
$static = true;
?>