Answers.Body: <p>I ended up creating an extension for a professional organization to handle this - ingredients:</p>
  
  <ol>
  <li><p><code>function membershipcards_civicrm_tokenValues</code> [you must create the tokens e.g.  <code>$value['membership.type']</code> and <code>$value['membership.status']</code> - I have 'see Example from Lobo' in my NOTES: <a href="https://civicrm.org/node/480" rel="nofollow">https://civicrm.org/node/480</a></p></li>
  <li><p>Then I have a Task: <code>class CRM_membershipcards_Task_IssueMembershipCards extends CRM_Contact_Form_Task {</code>
  So that you can Find -> Advanced Search Contacts -> select them and then in the -actions- you can pick: Print Membership Cards</p></li>
  <li><p>Then in the postProcess for that -action- I swap out the tokens and I re-use much of core mailing label bits - this is everything I want on the card:     </p></li>
  </ol>
  
  <blockquote>
    <p>$formatted = $row['addressee_display'] . "\n" .
    $row['contact.homestreetaddress'] . "\n"  . $row['contact.homecity'] .
    ' ' . $row['contact.homepostalcode'] . "\n" . "\n" . 'License #: ' .
    $row['external_identifier'] . "\n" . $row['membership.type'] . "\n" .
    $row['contact.activityskills'] . "\n" . 'Start Date: ' .
    $row['membership.startdate'];</p>
  </blockquote>
  
  <p>Eventually that gets passed onto <code>self::createLabel($rows, $fv['label_name']);</code></p>
  
  <p>Then my own <code>function createlabel</code> has all my custom layout for this organization: 
  XY positioning of the details, font, logo (watermark) placement, authorized signature. </p>
  
  <p>Hope this helps! You could just create the Tokens and then you might be able to get at them into a template - however if you really want control over layout/looks - you'll need your own createlabel. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-15T00:15:06.850Z
Answers.LastActivityDate: 2016-05-15T00:15:06.850Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>I have recently created an extension for printing membership card. It is not as generic as I would like it to be but a good start IMO :)</p>
  
  <p><a href="https://github.com/kurund/com.webaccessglobal.membershipcard" rel="nofollow noreferrer">https://github.com/kurund/com.webaccessglobal.membershipcard</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-26T06:04:02.437Z
Answers.LastActivityDate: 2016-11-26T06:04:02.437Z
Answers.UserDisplayName: Kurund Jalmi
Answers.Body: <p>I don't think that there is a function specific for membership cards, but I do believe that event badges is closer than adress labels.</p>
  
  <p>If you enable CiviEvent, you will get another possibility. For participants of an event, you have the ability to print  badges. The settings of badge printing will give you some more formatting options than an adress label.</p>
  
  <p>I have not tried this according to your specification, but I do think it could be worth a try.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-26T18:07:22.920Z
Answers.LastActivityDate: 2016-04-26T18:07:22.920Z
Answers.UserDisplayName: Flying
Body: <p>I'm trying to configure printing of a membership card directly from Civi using a custom mailing label format. Here's what I've done so far:</p>
  
  <ol>
  <li>Created a custom label format with the parameters for Avery Label 5371 (business card)</li>
  <li>Tried to get the data to print as a mailing label on the card stock (which is pre-printed with the org logo) by creating a message template using tokens for member name, membership expiration date, and membership type (Membership Card Data).</li>
  <li>From member search results, performed the action "Create Mailing Label" and selected the custom label format I created in step 1.</li>
  <li>Result is a nicely printed list with the name and address of each person, not the information specified in Membership Card Data.</li>
  </ol>
  
  <p>I am guessing that the custom label format controls the size and number of each entry on a page, and the Membership Card Data message template is ignored and replaced by the specs in Localization>Address Settings/Mailing Label. I can't find anywhere to add a new <strong><em>mailing label</em></strong> format that contains the tokens I need for membership cards. </p>
  
  <p>I've combed the boards and have seen discussions, but none seem to address my particular problem. Any thoughts? </p>
  
Tags: <civimember><joomla>
Title: Unable to create label format for membership card
ThreadText: # Unable to create label format for membership card
  
  (Asked by: username_0 on 2016-03-04)
  
  I'm trying to configure printing of a membership card directly from Civi using a custom mailing label format. Here's what I've done so far:
  
  1. Created a custom label format with the parameters for Avery Label 5371 (business card)
  2. Tried to get the data to print as a mailing label on the card stock (which is pre-printed with the org logo) by creating a message template using tokens for member name, membership expiration date, and membership type (Membership Card Data).
  3. From member search results, performed the action "Create Mailing Label" and selected the custom label format I created in step 1.
  4. Result is a nicely printed list with the name and address of each person, not the information specified in Membership Card Data.
  
  I am guessing that the custom label format controls the size and number of each entry on a page, and the Membership Card Data message template is ignored and replaced by the specs in Localization>Address Settings/Mailing Label. I can't find anywhere to add a new ***mailing label*** format that contains the tokens I need for membership cards.
  
  I've combed the boards and have seen discussions, but none seem to address my particular problem. Any thoughts?
  
  **Tags:** civimember, joomla
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-05-15. Score: 3
  
  I ended up creating an extension for a professional organization to handle this - ingredients:
  
  1. `function membershipcards_civicrm_tokenValues` [you must create the tokens e.g. `$value['membership.type']` and `$value['membership.status']` - I have 'see Example from Lobo' in my NOTES: <https://civicrm.org/node/480>
  2. Then I have a Task: `class CRM_membershipcards_Task_IssueMembershipCards extends CRM_Contact_Form_Task {`
     So that you can Find -> Advanced Search Contacts -> select them and then in the -actions- you can pick: Print Membership Cards
  3. Then in the postProcess for that -action- I swap out the tokens and I re-use much of core mailing label bits - this is everything I want on the card:
  
  > $formatted = $row['addressee\_display'] . "\n" .
  > $row['contact.homestreetaddress'] . "\n" . $row['contact.homecity'] .
  > ' ' . $row['contact.homepostalcode'] . "\n" . "\n" . 'License #: ' .
  > $row['external\_identifier'] . "\n" . $row['membership.type'] . "\n" .
  > $row['contact.activityskills'] . "\n" . 'Start Date: ' .
  > $row['membership.startdate'];
  
  Eventually that gets passed onto `self::createLabel($rows, $fv['label_name']);`
  
  Then my own `function createlabel` has all my custom layout for this organization:
  XY positioning of the details, font, logo (watermark) placement, authorized signature.
  
  Hope this helps! You could just create the Tokens and then you might be able to get at them into a template - however if you really want control over layout/looks - you'll need your own createlabel.
  
  
  ---
  
  ### Answer by username_2 on 2016-11-26. Score: 2
  
  I have recently created an extension for printing membership card. It is not as generic as I would like it to be but a good start IMO :)
  
  <https://github.com/kurund/com.webaccessglobal.membershipcard>
  
  
  ---
  
  ### Answer by username_3 on 2016-04-26. Score: 0
  
  I don't think that there is a function specific for membership cards, but I do believe that event badges is closer than adress labels.
  
  If you enable CiviEvent, you will get another possibility. For participants of an event, you have the ability to print badges. The settings of badge printing will give you some more formatting options than an adress label.
  
  I have not tried this according to your specification, but I do think it could be worth a try.
  
  
  ---
  
  