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, cMap, getCategoryBlock()
- This topic has 4 replies, 2 voices, and was last updated 12 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
11/12/2013 at 7:09 am #273444
Kris
GuestHello Steve,
im my Website the user can choose in the Form of “LINK” between several categories. For example he can choose 5 categories or even more.
But for the Reason of protect the layout in CMAP I will limit the output of the categories to only three.
Please, can you give me a code-snippet to realize that.11/12/2013 at 8:39 am #273448Kris
GuestHello Steve,
I try to customize this part of code out of CARD.PHP in CMAP-folder. But I did not get it work.
<p style=”float: left;text-align: left;font-size:12px;width:30%;”>
<?php $entry->getCategoryBlock( array( ‘separator’ => ‘, ‘, ‘before’ => ‘<span>’, ‘after’ => ‘</span>’ ) ); ?>
</p>11/12/2013 at 1:25 pm #273482Steven Zahm
Keymaster@ Kris
Open this file:
../wp-content/plugins/cmap/card.phpAdd this code where you would like the categories to be shown:
$entry->getCategoryBlock( array('separator' => ', ', 'before' => '<span>', 'after' => '</span>') );Save and upload overwriting the original file.
You may also have to add it to the following file depending on your configuration:
../wp-content/plugins/cmap/card-single.phpHope that helps.
11/12/2013 at 3:13 pm #273505Kris
GuestHello Steve,
I already add the peace of code to ../wp-content/plugins/cmap/card.php.
That works fine.
But I will limit the output of categories to three categories only.I try:
$entry->getCategoryBlock( array(‘number’ => 3, ‘separator’ => ‘, ‘, ‘before’ => ‘<span>’, ‘after’ => ‘</span>’ ) );
$entry->getCategoryBlock( array(‘limit’ => 3, ‘separator’ => ‘, ‘, ‘before’ => ‘<span>’, ‘after’ => ‘</span>’ ) );
Both possibilities did not work. “The limit” oder “the number” does not apply to limit the output of the categories.
Did you have an approach for a solution.
Greetings,
Kris
11/13/2013 at 11:11 am #273593Steven Zahm
Keymaster@ Kris
Oh, ok, now I understand what you’re asking for. Sorry but there is not a way to limit the output of the categories that are assigned to an entry and there isn’t a snippet of code I can give you to do that.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
