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, category, cnTemplatePart
- This topic has 5 replies, 2 voices, and was last updated 13 years ago by
Ryan Chamberlin.
-
AuthorPosts
-
07/19/2013 at 6:22 pm #265239
Ryan Chamberlin
ParticipantI have the cmap theme but it only seems to show a drop-down list for categories.
I want to show a list of categories instead.In my wp page template I tried calling $connections->retrieve->categories(); but it seems that connections is not initialized yet.
Can you point me in the right direction to either initialize the class in my template, or where to add the calls in the connections theme?
By the way, my template checks to see if ‘cn-cat’ is set. If it is, then it shows the page normally. If not, then it only shows the category list (or would if i could figure that part out)
07/20/2013 at 9:43 am #265266Steven Zahm
Keymaster@ Ryan
The plugin is long initialized before anything is even shown on the screen. The
$connections->retrieve->categories();method only retrieves the raw data. You would have to loop thru the data.Try this instead:
cnTemplatePart::category( array( 'type' => 'link', 'layout' => 'table', columns => 3 ) );It’s a beta feature that I haven’t tested much beyond the actual coding of it to see if the basics worked.
07/20/2013 at 2:10 pm #265275Ryan Chamberlin
ParticipantYour code works, but I want more control over the layout.
I actually just figured out my issue; retrieve->categories returns an array.
I expected an object so I was trying to call getName().
Using array keys instead is working!thanks
07/20/2013 at 2:23 pm #265280Ryan Chamberlin
ParticipantWeird; turns out it does return an object but I had a typo in my code.
07/21/2013 at 10:29 am #265358Steven Zahm
Keymaster@ Ryan
I’d love to see what you done. Please do share a link. Many thanks!
07/23/2013 at 3:54 pm #265591Ryan Chamberlin
ParticipantI just got done coding an email dump from the database for our admin’s mailing list so I should get the go-live approval today.
I’ll share the link when it’s live. -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
