- Posts: 3722
COMMUNITY FORUM
Using Extra Fields for lists
- william white
-
Topic Author
- Offline
- Platinum Member
Less
More
14 years 10 months ago #85327
by william white
Using Extra Fields for lists was created by william white
The default category view with everything turned off except extra fields produces a verticle listing of extra fields. My desired result is to have them in a table format.I have used k2 override with onecss4k2 css file to produce a category view that creates a table (really multiple tables) populated with xtra field values. One of the fields would be "link type" to carry you to the item view. Changes to template_style.css tightened up the spaces and made it appear to be one table.I got inside the first foreach loop in category.php and embedded the xtra field foreach loop into it after removing the divs and spans and replacing them with table tr and td tags.This works so long as:1. there are only 4 extra fields2. they are all populated in each k2 itemThis will most certinally break. ? is there a better approach to this end?
Please Log in or Create an account to join the conversation.
- william white
-
Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 10 months ago #85328
by william white
Replied by william white on topic Using Extra Fields for lists
bump
Please Log in or Create an account to join the conversation.
- william white
-
Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 10 months ago #85329
by william white
Replied by william white on topic Using Extra Fields for lists
attached
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
14 years 10 months ago #85330
by Yiota
Replied by Yiota on topic Using Extra Fields for lists
Why have you put the extra fields code in category_item.php? Is there a reason for that?
Please Log in or Create an account to join the conversation.
- william white
-
Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 10 months ago #85331
by william white
Replied by william white on topic Using Extra Fields for lists
see attached
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
14 years 10 months ago #85332
by Yiota
Replied by Yiota on topic Using Extra Fields for lists
I think you can put it inside the category_item.php. That would be more appropriate. Once you have it under the call of item. And if you don't want to ruin the default category_item.php you can make an if statement and choose between loading the category_item or a category_item_extrafields, for example.
Please Log in or Create an account to join the conversation.
- william white
-
Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 10 months ago #85333
by william white
Replied by william white on topic Using Extra Fields for lists
Thanks for your help!, I will try that route this evening over here:)
Over here, we say Down Here
Over here, we say Down Here
Please Log in or Create an account to join the conversation.