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.9.3, category, fields, getAddressBlock, getCategoryBlock(), slim plus
- This topic has 15 replies, 5 voices, and was last updated 8 years, 4 months ago by
Steven Zahm.
-
AuthorPosts
-
10/16/2014 at 4:33 am #307228
Dave
GuestHi Steven,
Thanks for the speedy response and apologies if I wasn’t clear. I’m referring to the (unexpanded) listings as you can see at http://www.sfny.co.uk/business-directory/. This is where I’d like to show photo, along with categories and phone which I’ve already added.
Hope this makes sense!
Thanks,
Dave
10/16/2014 at 11:02 am #307240Steven Zahm
Keymaster@ Dave
You need to move this block of code:
$entry->getImage( array( 'image' => $atts['image'], 'height' => 120, 'width' => 100, 'fallback' => array( 'type' => $atts['image_fallback'], 'string' => $atts['str_image'] ) ) );
to before this line:
in_array( 'show', $categories ) ? $show = ' cn-show' : $show = ' cn-hide';
in the
card.php
file.Hope that helps!
08/01/2015 at 6:42 pm #341870Kevin Johnson
ParticipantHi Eric,
I found this thread, and subsequently saw your mods to the Slim Plus listing on your Membership page. This is something I would love to duplicate, as I think for our purposes (and obviously yours too), listing our contacts by country would be amazing. I’m also using Slim Plus, and I love it!
I don’t need to have the cobtacts broken into regions, but I wondered if you might be willing to share your code to group the contacts by country?
I also changed the code to include City and Country in the simple listing, but like you, I’m getting the City and Country on separate lines, and I’d much prefer to have then on the same line as the name, in the same format you have i.e.
Kevin Johnson (Sydney, Australia)
I’d be really grateful (as would our conservation partners) if you could maybe help me out with how you achieved this?
Many thanks in advance,
Kevin
08/04/2015 at 9:50 am #342124Steven Zahm
Keymaster@ Kevin
To get the city and country on the same line follow the instructions given to Eric in this reply:
Hope that helps!
08/04/2015 at 7:52 pm #342219Kevin Johnson
ParticipantHi Steven,
Thanks again for your quick reply. I’m afraid I’m not as smart as I had hope with this, and I wondered if you might be able to take a quick look at what I’ve done, and identify the problem?
I’ve tried modifying the code from what you suggested to Eric to suit my needs, but I just can’t get it quite right. The code I had before I modified it shows the name and country, but on 2 separate lines:
echo '<h3 class="cn-accordion-item" data-div-id="cn-detail-' , $uuid , '"' , ' style="border-top: ' , $atts['color'] , ' 1px solid; color:' , $atts['color'] , ';">' , $entry->getNameBlock( array( 'format' => $atts['name_format'] ) ) , ' ' , $entry->getAddressBlock( array( 'format' => '%country%' ) ) , '</h3>';
I modified this based on the code from your earlier post above, and changed it to:
echo ‘
<h3 class=”cn-accordion-item” data-div-id=”cn-detail-‘ , $uuid , ‘”‘ , ‘ style=”border-top: ‘ , $atts[‘color’] , ‘ 1px solid; color:’ , $atts[‘color’] , ‘;”>‘ , $entry->getNameBlock( array( ‘format’ => $atts[‘name_format’] ) ) ;
$address = $entry->getAddresses(); if ( isset( $address[0] ) ) { if ( ! empty( $address[0]->country ) ) echo ', ' , $address[0]->country; } echo '</h3>
‘;
The output is now reflecting the change, with the ‘,’ and country added, but the country is still on a second line, and is now showing up in the same color as the horizontal separator, as per the image below.
Can you suggest what I have done wrong?
Many thanks,
Kevin
Attachments:
You must be logged in to view attached files.08/05/2015 at 4:32 pm #342286Steven Zahm
Keymaster@ Kevin
Try adding this CSS:
#cn-slim-plus span.fn { display: inline-block !important; }
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.