Having made a few concrete implementations of the Checklist API, I've concluded that the link "context" flag just isn't very useful, since it's difficult to imagine a use case that doesn't create significant usability complications. So I've decided to remove the feature. However, since the checklist definition is parsed on each page request, the functionality can still be accomplished by simply placing the link definition in a conditional. For example:

$saved_progress = variable_get('checklistapi_checklist_YOURCHECKLIST');
if ($saved_progress['YOURITEM']) {
  $definition['EXAMPLEGROUP']['YOURITEM']['YOURLINK'] = array(
    '#text' => t('Google'),
    '#path' => 'http://www.google.com/',
  );
}

In this way the link display can be conditioned on any testable criteria, which is much more robust, and it keeps the APi simpler.

Comments

Status: Fixed » Closed (fixed)

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