- Posts: 6
COMMUNITY FORUM
Group by brand
- Paul Le Fevre
-
Topic Author
- Offline
- New Member
Less
More
13 years 10 months ago #97447
by Paul Le Fevre
Group by brand was created by Paul Le Fevre
Hi there, I am having a lot of fun working with K2 on a small product catalog I am building. I have a layout on the home page that I want to achieve and need a little help. I have attached an image showing the result I'd like.
I currently have items being listed across multiple categories on the home page in 4 columns. This part is working well but rather than just have them loose (from different brands) I'd like to have them 'grouped' together by brand ie. have a Brand heading, then the items from that brand listed underneath, then the next brand heading and so on.
Currently I have created extra fields including 'Manufacturer' (brand). I have also used the brand in a tag for each item but even though these can isolate items on a page, they can't group items from multiple brands on the one page.
I did see a suggestion to use the Author as the brand but I couldn't see how this would be an elegant solution.
I am building this for a friend who has a bike shop and is not terribly good with computers so I want to be able to set up this catalog for him to manage easily from the front-end.
I will need to account for what happens when there are no active items for a given brand and how the brands would be managed.
Thanks in advance.
Paul
I currently have items being listed across multiple categories on the home page in 4 columns. This part is working well but rather than just have them loose (from different brands) I'd like to have them 'grouped' together by brand ie. have a Brand heading, then the items from that brand listed underneath, then the next brand heading and so on.
Currently I have created extra fields including 'Manufacturer' (brand). I have also used the brand in a tag for each item but even though these can isolate items on a page, they can't group items from multiple brands on the one page.
I did see a suggestion to use the Author as the brand but I couldn't see how this would be an elegant solution.
I am building this for a friend who has a bike shop and is not terribly good with computers so I want to be able to set up this catalog for him to manage easily from the front-end.
I will need to account for what happens when there are no active items for a given brand and how the brands would be managed.
Thanks in advance.
Paul
Please Log in or Create an account to join the conversation.
- Dylan Humphreys
-
- Offline
- New Member
Less
More
- Posts: 12
13 years 10 months ago #97448
by Dylan Humphreys
Replied by Dylan Humphreys on topic Group by brand
Its possible you could do this with a template override. Youd have to bend some MVC programming rules to get it done, but it is possible,
You can read about template overrides here.
docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
My suggestion would be to create your own layout called (for example) brand.php
Then you could call the layout with a simple addition to the url
www.yoursite.com/index.php?option=com_k2&view=category&layout=brand
Then you would have to do some coding in brand.php that reorganised the k2 content items into the layout you want... a bit messy programming wise, but it would hide the nuts and bolts from your freind.
You can read about template overrides here.
docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
My suggestion would be to create your own layout called (for example) brand.php
Then you could call the layout with a simple addition to the url
www.yoursite.com/index.php?option=com_k2&view=category&layout=brand
Then you would have to do some coding in brand.php that reorganised the k2 content items into the layout you want... a bit messy programming wise, but it would hide the nuts and bolts from your freind.
Please Log in or Create an account to join the conversation.
- Paul Le Fevre
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 6
13 years 10 months ago #97449
by Paul Le Fevre
Replied by Paul Le Fevre on topic Group by brand
Thanks so much Dylan. I'll give that a try.
Please Log in or Create an account to join the conversation.