I came up with a work around for this in case anyone encounters this issue in the future.
I ended up reverting back to the default views output and did away with my custom template. The reason I did it in the first place was so I could have a custom CSS class for Location. In other words I have events assigned to cities like New York and Boston and I wanted them color coded with CSS. It worked in my custom views template but as I stated in the original post, my custom labels / field names were not being rendered like they are in default views without a custom template.
Now for the solution:
So for the City field in my view, I checked the box called: "Rewrite the output of this field"
In the box I can put my custom field and wrap it with some CSS that calls the field as a class.
Here is my code for the rewrite box:
<div class="[field_event_location_value]">[field_event_location_value]</div>This outputs HTML as:
<div class="New York">New York</div>or
<div class="Boston">Boston</div>...depending on the city the event is assigned to.
I can now make custom classes to display cities as different colors as such:
.page-events .York
{color: #2D73A4;}
.page-events .Boston
{color: #86AC18}I'm happy with this solution and I hope it can help others in the future.
I have a custom views 2 theme called:
views-view-fields--date-browser-theme.tpl.php
My fields are:
<?php print $fields['title']->content ?><?php print $fields['field_event_link_text_value']->content ?>
<?php print $fields['field_event_time_value']->content ?>
<?php print $fields['field_sponsored_event_value']->content ?>
<?php print $fields['field_eventlink_url']->content ?>
<?php print $fields['field_event_location_value']->content ?>
The fields listed above output data and they are working and showing data as expected, I can tweak CSS, reorder fields, that was my goal in creating the custom template.
However, the only issue is that in my view I have some custom label names for various fields and I cannot figure out how to show these in my custom view template. For example for field_event_location_value I have "City:" as the label name and it worked fine before I created my custom view theme so now I need some guidance on how to display this in my custom view theme template.