WordPress.org

Ready to get started?Download WordPress

Forums

Connections Business Directory
[resolved] Adding custom field to table (2 posts)

  1. ceviz ms
    Member
    Posted 1 year ago #

    I would like to add a number filed to tables. Like player numbers. Prefix is useless for me but want to add it to somewhere else in the table. Also removing prefix from getNameBlock would be usefule as well.

    <table width="100%" border="0px" bgcolor="#FFFFFF" bordercolor="#E3E3E3" cellspacing="0px" cellpadding="0px" style="margin: 0; vertical-align: top;">
        <tr>
        	<td width="5%" align="right" style="vertical-align: inherit;padding-right: 5px;">PREFIX HERE</td>
            <td align="left" width="100%" valign="top" style="vertical-align: top;">
            <div style="float:left;">
            	<div style="float:left;"><?php echo $entry->getImage(); ?></div>
    
    			<div style="float: left; margin: 0 5px;">
    				<div style="margin-left: 10px;">
    					<span style="font-size:larger;font-variant: small-caps"><strong><?php echo $entry->getNameBlock(); ?></strong></span>
    
    					<?php $entry->getTitleBlock(); ?>
    					<?php $entry->getOrgUnitBlock(); ?>
    					<?php $entry->getContactNameBlock(); ?>
    
    				</div>
    
    				<?php $entry->getAddressBlock(); ?>
    			</div></div>
            </td>
    
        </tr>
    
    </table>

    http://wordpress.org/extend/plugins/connections/

  2. shazahm1
    Member
    Plugin Author

    Posted 1 year ago #

    To remove the prefix (suffix too) from the name use this:

    $entry->getNameBlock( array( 'format' => '%first% %middle% %last%' ) );

    To show just the prefix:

    $entry->getNameBlock( array( 'format' => '%prefix%' ) );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic