Keyword

Custom Category layout - Custom mysql and php

More
11 years 11 months ago #104960 by D
Is there a way to create a K2 category listing that displays customized php and mysql?

For example, I have 2 "levels" of customers - normal and enhanced.

I want listings for both levels of customers to appear on a Category listing page, with the Enhanced customers displayed first, above the normal customers.

Can anyone point me to a resource for using custom php and mysql with K2?

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #104961 by william white
Replied by william white on topic Re: Custom Category layout - Custom mysql and php
I would use categories and or tags
with categories
Customers
Normal
Enhanced
use Mod_k2_content with Enhanced subcategory first
Use mod_k2_content with Normal subcategory second
Use modules anywhere from nonumber.nl to insert both of the modules into one k2 item or joomla article...
without programming

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #104962 by D
I'm having a bit of a hard time understanding your reply.

Is Mod_k2_content a plugin of some kind?

Right now I have 1 master category with several sub categories:

Properties
- - North Properites
- - South Properties
- - East Properties
- - West Properties

Then I also have 2 distinct User Groups:

- Property Owners
- Property Owners Enhanced.

If a property owner is "Enhaced" they get more information shown with their individual properly listing - a photo for example.

So Property Owners will have this limited info shown for their individual property:

Name
Address
Phone

Enhanced Property Owners will have all of the above, and more:

Name
Address
Phone
Website Link
Photo

So on the Category page for "North Properties" I need to show a summary of all properties assigned to that category, with the enhanced properties appearing first.

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #104963 by william white
Replied by william white on topic Re: Custom Category layout - Custom mysql and php
You are basically talking about registared and nonregistared users
or
users who are a member of one group vs
users who are a member of another group
You will most likely need to make a k2 template and assign it to the categories
In the override you could show only the items for nonregistared users in the category view
and set the item view which includes all the information avaliabvle only to registared users

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #104964 by D
Thank you for the help William.

I can accomplish almost everything I want using the K2 Content module.

I can use that module to sort my items and put the "Enhanced" items first. I do this by simply reordering the items in the "Select specific items" list. This sort of manual sorting will work fine for my needs.

Now a new question...I want to do this sorting and ordering under separate sections of my website.

So under the North Properties, I want to put all the North listings (items) and then sort them. I only want to display the North listings and no others.

I'm thinking I'll have to make a new K2 Content module for each section of my site then pull the appropriate items for each section and sort them. Having a K2 Content module for each section would work fine. I'd end up with 4 distinct K2 Content modules, one for each section of my site (north, south, east, west).

But how do I then assign each custom content module to a section of my site? Would I do that via associating a K2 Content module with a menu item?

I'm not sure how to associate each K2 Content module with a section of my site.

Any suggestions?

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #104965 by D
Disregard my last post. I figured it out. I think I am actually good to go now!

Thanks so much for the help William. I appreciate your feedback, advice and expertise!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum