Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 0.7.8.1, getTitleBlock
- This topic has 6 replies, 2 voices, and was last updated 12 years, 11 months ago by
Steven Zahm.
-
AuthorPosts
-
08/27/2013 at 7:58 pm #268163
Bog Patterson
ParticipantI am trying to add the users title to the main listing of users. An example would be:
Bog Patterson Director of Technology
I have tried to add %title% to line 212 of slim-plus.php
$permittedAtts[‘name_format’] = ‘%prefix% %first% %middle% %last% %suffix% %title%’;
but this just adds %title% not the real title. How can I acheive this?
08/27/2013 at 7:58 pm #268164Bog Patterson
ParticipantYou can check it out here:
08/28/2013 at 1:39 pm #268186Steven Zahm
Keymaster@ Bog
There is not a %title% token that can be used in the name format. Adding that would break the hCard compatibility markup.
The on way to do this would be to edit the actual core template PHP file.
Is that something you would be comfortable doing? If so, I could provide some guidance.
08/28/2013 at 2:50 pm #268192Bog Patterson
ParticipantYes I would be very comfortable and happy to edit the core template. I was editing the slim-plus.php file to add the %title%.
08/28/2013 at 4:45 pm #268212Steven Zahm
Keymaster@ Bog
Ahh, so you were. I didn’t read close enough, sorry.
You need to make the change to the
card.phpfile found in the same folder.Find this line:
if ( $atts['show_title'] )$entry->getTitleBlock();Delete it.
Find this line:
echo '<h3 class="cn-accordion-item" data-div-id="cn-detail-' , $uuid , '"' , ' style="border-bottom: ' , $atts['color'] , ' 1px solid; color:' , $atts['color'] , ';"><span class="cn-sprite' . $open . '" style="background-color: ' , $atts['color'] , ';"></span>' , $entry->getNameBlock( array( 'format' => $atts['name_format'] ) ) , '</h3>';Change it to:
echo '<h3 class="cn-accordion-item" data-div-id="cn-detail-' , $uuid , '"' , ' style="border-bottom: ' , $atts['color'] , ' 1px solid; color:' , $atts['color'] , ';"><span class="cn-sprite' . $open . '" style="background-color: ' , $atts['color'] , ';"></span>' , $entry->getNameBlock( array( 'format' => $atts['name_format'] ) ) , ' ' , $entry->getTitleBlock() , '</h3>';You will very like have to add CSS to make the title an inline item rather than a block item.
Hope that helps.
08/28/2013 at 5:16 pm #268216Bog Patterson
ParticipantWorked well. Is there a way to keep it on the same line as the users name instead of below it?
08/28/2013 at 8:38 pm #268258Steven Zahm
Keymaster@ Bog
You’ll have to add this to the end of your theme’s style.css file:
#cn-excerpt-plus span.title, #cn-excerpt-plus span.fn { display: inline; } -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
