Forum Replies Created
-
AuthorPosts
-
Kevin 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.Kevin Johnson
ParticipantThanks for your quick reply Steven :-). This issue was actually a problem with my custom theme’s css file, so I modified the
h3definition in there, and also in the slim-pus.min.css file:#cn-slim-plus h3{font-size: 14px;font-weight:bold;line-height:17px;color: #5d5d5d;padding:6px 0}I’ve added the Country to each card’s heading, and am sorting the list by Country as you can see below, but I’d love to be able to display this inline with the Name, e.g.:
Kevin Johnson, Australia
I’ve been following a similar discussion in a different thread, but I just can’t get the
display:inline;code in the right place. Are you able to offer a suggestion for adding moving the country to the same line as the name?Many thanks,
Kevin
Attachments:
You must be logged in to view attached files.Kevin Johnson
ParticipantOops! I wrote too soon. I have just resolved this issue :-)
Kevin 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
-
AuthorPosts
