- Posts: 47
COMMUNITY FORUM
K2 BNR Content module
- BNR Investment Group
- Topic Author
- Offline
- Senior Member
Less
More
13 years 6 months ago #88158
by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
You're close now. The module and the item parameters are independent of each other. In your example if you wanted to show the item image in the module, you would need to set the image to hide in the item and show in the module. Otherwise, the image would show both in the item and in the module.
Please Log in or Create an account to join the conversation.
- rexkramer
- Offline
- Senior Member
Less
More
- Posts: 71
13 years 6 months ago #88159
by rexkramer
Replied by rexkramer on topic K2 BNR Content module
AMM seems to work with the K2 options in the parameters section is a setting for article-pages only! The AMM option "hide if empty" is misleading, it effects the Module-title only, not the module position. You have to select the K2 categoies and check the option for the page-type!!! Then you are in business ;-)
Important: The AMM compare method should read "OR".
Brent Friar said:
The extra fields are simply dumped in to an array, it is literally a single field in the DB. What I generally do is use a template override to select just the parts of the array I want to display. Once you figure out which array index goes with which extra field you can do all kinds of stuff.
As far as having the module empty, I am not sure there is a good solution for this due to the way Joomla works. It might collapse properly using Adv Mod Manager since it has the option to suppress output if the module is empty. Joomla creates a module wrapper regardless of the output of the module to the change would need to be a that level rather than within the module. I'll have to see if AMM allows a position to collapse properly on category pages.
Important: The AMM compare method should read "OR".
Brent Friar said:
The extra fields are simply dumped in to an array, it is literally a single field in the DB. What I generally do is use a template override to select just the parts of the array I want to display. Once you figure out which array index goes with which extra field you can do all kinds of stuff.
As far as having the module empty, I am not sure there is a good solution for this due to the way Joomla works. It might collapse properly using Adv Mod Manager since it has the option to suppress output if the module is empty. Joomla creates a module wrapper regardless of the output of the module to the change would need to be a that level rather than within the module. I'll have to see if AMM allows a position to collapse properly on category pages.
Please Log in or Create an account to join the conversation.
- BNR Investment Group
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 47
13 years 6 months ago #88160
by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
Excellent! I will have to keep that in mind when I run in to the problem. Thanks.
Please Log in or Create an account to join the conversation.
- Sam Harney
- Offline
- Junior Member
Less
More
- Posts: 33
13 years 5 months ago #88161
by Sam Harney
Replied by Sam Harney on topic K2 BNR Content module
I'm having problems with the template override... I need to remove the paragraph markup from before after the image as the template is trying to process the item image and intro text in one statement instead of separate ones. I have created a folder under my template folder with a copy/paste of the K2 BNR module name, and copied the default.php file into it. I have modified the php file so that it should no longer create the paragraph tag; however the template override is not being picked up... I have tried with multiple browsers with no luck... Can anyone offer some pointers to assist with this.
Please Log in or Create an account to join the conversation.
- BNR Investment Group
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 47
13 years 5 months ago #88162
by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
In the module, you will see a dropdown that allows you to select the various subtemplates that you create. You should name any subtemplates something other than default so that your modules can be styled individually. Your file structure should look like this -
Templates
> HTML
> mod_k2bnr_content
> subtemplate01
> subtemplate02
> subtemplate03
Templates
> HTML
> mod_k2bnr_content
> subtemplate01
> subtemplate02
> subtemplate03
Please Log in or Create an account to join the conversation.
- James Synbian
- Offline
- New Member
Less
More
- Posts: 2
13 years 5 months ago #88163
by James Synbian
Hi Brent, fantastic module. Wondering if you could offer me a little guidance with the control of extra fields? I have two extra fields, one 'textfield' and one 'textarea' which I'd like in separate module positions using your module. I've used a template override but am not sure on how to code in which extra field I want to display in the display.php file. Could you point me in the right direction to which array index controls each extra field and maybe the code needed? Many thanks for any help,
Brent Friar said:
The extra fields are simply dumped in to an array, it is literally a single field in the DB. What I generally do is use a template override to select just the parts of the array I want to display. Once you figure out which array index goes with which extra field you can do all kinds of stuff.
Replied by James Synbian on topic K2 BNR Content module
Hi Brent, fantastic module. Wondering if you could offer me a little guidance with the control of extra fields? I have two extra fields, one 'textfield' and one 'textarea' which I'd like in separate module positions using your module. I've used a template override but am not sure on how to code in which extra field I want to display in the display.php file. Could you point me in the right direction to which array index controls each extra field and maybe the code needed? Many thanks for any help,
Brent Friar said:
The extra fields are simply dumped in to an array, it is literally a single field in the DB. What I generally do is use a template override to select just the parts of the array I want to display. Once you figure out which array index goes with which extra field you can do all kinds of stuff.
Please Log in or Create an account to join the conversation.
- BNR Investment Group
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 47
13 years 5 months ago #88164
by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
All of the extra field info is kept in the $item->extra_fields array. K2 has a nice little function that parses the DB info when it builds the array so you can access individual extra field info with $item->extra_fields[X]->name and $item->extra_fields[X]->value where X is the index of the array. Remember that indexes start at 0 and increment from there. Now you can simply echo the contents of each extra field and display them any way you like.
Please Log in or Create an account to join the conversation.
- James Synbian
- Offline
- New Member
Less
More
- Posts: 2
13 years 5 months ago #88165
by James Synbian
Replied by James Synbian on topic K2 BNR Content module
Absolutely spot on, that's sorted me out nicely and has made a fantastic module even better ;) great support too, thank you very much!
Brent Friar said:
All of the extra field info is kept in the $item->extra_fields array. K2 has a nice little function that parses the DB info when it builds the array so you can access individual extra field info with $item->extra_fields[X]->name and $item->extra_fields[X]->value where X is the index of the array. Remember that indexes start at 0 and increment from there. Now you can simply echo the contents of each extra field and display them any way you like.
Brent Friar said:
All of the extra field info is kept in the $item->extra_fields array. K2 has a nice little function that parses the DB info when it builds the array so you can access individual extra field info with $item->extra_fields[X]->name and $item->extra_fields[X]->value where X is the index of the array. Remember that indexes start at 0 and increment from there. Now you can simply echo the contents of each extra field and display them any way you like.
Please Log in or Create an account to join the conversation.
- BNR Investment Group
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 47
13 years 5 months ago #88166
by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
No problem, glad to help. Be sure to post a link, I would love to see how you are using it.
Please Log in or Create an account to join the conversation.
- Andrea
- Offline
- New Member
Less
More
- Posts: 18
13 years 2 months ago #88167
by Andrea
Replied by Andrea on topic K2 BNR Content module
hi all :(
i've installed k2 bnr content but don't show anything.. someboyd can help me please? :\
thanks
andrea
i've installed k2 bnr content but don't show anything.. someboyd can help me please? :\
thanks
andrea
Please Log in or Create an account to join the conversation.