When using a (pre-)process hook to alter the contents of the MSNF step info block (see #1980580: Links in block of steps), you can alter the links themselves, but the only context provided in $vars is the list of all steps and the current step.

My use case is to provide information about the "completeness" of each step, by comparing the current state of the node being edited to the fields associated with each step. I then add a class to the link which visually indicates how "complete" they are according to our business logic.

The attached patch takes information we already have (the $form_state) when setting up the block variables, and adds it to the theme processing pipeline. You obviously can't edit the contents of $vars['form_state'] and expect those changes to propagate to the form processing, but users who are taking advantage of a theme preprocess hook are likely advanced enough to realize this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bradjones1’s picture

Status: Active » Needs review
ssoulless’s picture

Status: Needs review » Reviewed & tested by the community

Think this patch is Ok its working and I think it must be commited

stBorchert’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch, I've committed your changes.

Status: Fixed » Closed (fixed)

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