The label/link is not appearing when I add the CCLink Label as a field.

Comments

muhleder’s picture

I'm not getting them come up either. I'm using a hardcoded theme override in template.php. I set the label for my cclink as 'Paid for this year' and then test if that field is being written when the code loops through all the fields. Not pretty but it's doing the trick for the moment.

<?php

function phptemplate_views_view_table($view, $nodes, $type) {
  $fields = _views_get_fields();
	$referer =  $_SERVER['REQUEST_URI'];
	$referer = substr($referer, 1);  // strip first slash
  foreach ($nodes as $node) {
    $row = array();		
    foreach ($view->field as $field) {
		$nid = $node->nid;
      if ($fields[$field['id']]['visible'] !== FALSE) {
        $cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
        $cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
				if ($field['label'] == "Paid for this year") {
					$cell['data'] = "<a href='/cclinks/cclink0/".$nid."/".$nid."?destination=".$referer."'>Paid this Year</a>";
				}
        $row[] = $cell;
      }
    }		
    $rows[] = $row;
  }
  return theme('table', $view->table_header, $rows);
}

?>
fago’s picture

they come only up if they are scheduled - as otherwise there is no db entry for them.

hm, docs needs to be improved here.

fago’s picture

Status: Active » Fixed

I've just renamed the field and added some further description for it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.