Keyword

K2 BNR Content module

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 8 months ago #88148 by BNR Investment Group
K2 BNR Content module was created by BNR Investment Group
K2 BNR Content is a modification to the standard K2 content display module. Rather than define the content you want to display in the module, this module pulls the item data from the current item being displayed.This allows you to expand your layout options since you can now display part of the item content in the main content display area and other bits of content in the module positions. You can even load more than one module per page to deliver highly complex layouts with the content exactly where you want it!

The module also supports subtemplates so you can completely control not only which content is displayed in the module, but also how it is displayed.

The attached image shows the extra fields for the item being displayed in the left column. The main image banner across the top is also in a module position so it can change based on the item image that has been uploaded.

You can download the module in the JED here - K2 BNR Content
CHANGE LOG
V1.4.0Added Social Links and Related Items by Tag as display optionsV1.3.0Fixed PHP 5.3.x plugin event errors due to variable not being passed by reference
V1.2.0Fixed Undefined property errorsFixed Undefined variable errors
v1.1.0 - Fixed module template override issues. You can now add your template overrides in templates/[template name]/html/mod_k2bnr_content and the module will see the folders and use the correct files.
Attachments:

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

More
14 years 8 months ago #88149 by william white
Replied by william white on topic K2 BNR Content module
Good Work! I got it off of the joomla extensions last evening, and posted there....
Worked well, installed the first time....a good addition to allowing placement of many things on the page
thanks

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 8 months ago #88150 by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
Thanks for the review and kind words William. I figure we've been using this for a while and I put K2 on just about every site we build, so might as well start giving some back to the community. I've got some other modules we use that need a little clean up before they make it out to the general public, but more is on the way.

William White said:Good Work! I got it off of the joomla extensions last evening, and posted there.... Worked well, installed the first time....a good addition to allowing placement of many things on the page
thanks

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 6 months ago #88151 by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
Update - As usual, enterprising Joomla users find new and interesting ways to use an extension. While not my original intention, this module is also very good for hiding content from unregistered users. You can display registered user only content in the module by simply setting the permission of the module to registered. It's very clean and easy to implement.

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

  • Christian Sweningsen
  • Christian Sweningsen's Avatar
  • Offline
  • New Member
More
14 years 2 months ago #88152 by Christian Sweningsen
Replied by Christian Sweningsen on topic K2 BNR Content module
Hi, sorry to bother you with the obvious. Looks like this will solve a number of problems on my site. But - I am a "Noobe," and though I have an experienced site builder helping, I really don't have a clue how to make use of this, or what to tell her.

 

I don't see any documentation at all? Don't see a read me, don't see notes in the module ... what am I missing?

 

Thanks in advance, Christian

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 months ago #88153 by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
This works basically the same as the K2 Content module. You enable the module in a position, then choose the content you want to display. The main difference is that you don't select which items to display. This module automatically picks up the item being displayed, then displays content from that item in the module position.

 

Typically, all of the content from an item displays in the content area of the template. This allows you to put some content in the content area, the related video in the one column, the extra fields in another column, and the photo gallery in the footer for example.
Christian Sweningsen said:

Hi, sorry to bother you with the obvious. Looks like this will solve a number of problems on my site. But - I am a "Noobe," and though I have an experienced site builder helping, I really don't have a clue how to make use of this, or what to tell her.

 

I don't see any documentation at all? Don't see a read me, don't see notes in the module ... what am I missing?

 

Thanks in advance, Christian

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

More
14 years 2 months ago #88154 by rexkramer
Replied by rexkramer on topic K2 BNR Content module
Thank you and congrats to your work and effort. Really a "fun" approach to layout K2 articles with the normal J! module positions. Very intuitive and a nice solution for people that are used to do things that way (don't we all belong to that group;-) )

Maybe not interesting for K2 themers, who work on K2 templates and overrides on a daily basis.

By the way... i am not that deep into the inner workings of K2... but is it possible to retrieve single extra fields? We always get the whole extra field group. Do you have a clue?

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

More
14 years 2 months ago #88155 by rexkramer
Replied by rexkramer on topic K2 BNR Content module
@Brent

one question or issue:

Since this module is for the article full-view... there is no option to restrict the module-output to article pages. When you are on a K2 Category the module position for BNRcontent  is not empty. This happens in Purity, MilkyWay and Beez, so i guess its not a template question and has nothing todo with collapsable module positions.

The only way to restrict the output on article pages is to use:


AdvancedModuleManager
MetaMod

right?

 

Maybe its possible and easier for other users to have this option right inside the Module code?! Then there is no need to have other helpers. I mean, something that checks the URL for the view mode or something like that...

 

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 months ago #88156 by BNR Investment Group
Replied by BNR Investment Group on topic K2 BNR Content module
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.

  • Christian Sweningsen
  • Christian Sweningsen's Avatar
  • Offline
  • New Member
More
14 years 2 months ago #88157 by Christian Sweningsen
Replied by Christian Sweningsen on topic K2 BNR Content module
Hi Brent, thanks for the response; but I'm afraid I am still in the dark, hope you can indulge me, I'm sure it is obvious to the "initiated," but that sure isn't me! - yet, though more so every day.

 

>you don't select which items to display. This module automatically picks up the item being displayed, then displays content from that item in the module position.<

 

OK, maybe I've got it. I put the module on a "page" with an Item displaying in the Content position. I set the module parameters - e.g. "Show image". The module shows the image that is "in" the Item. Yes? And in the Item - do I set the parameters the same way, e.g. "Show image", but the module does it instead? Or do I set the Item to Not show image?

 

Thanks in advance,

Christian

 

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 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.

More
14 years 1 month 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.

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 1 month 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.

More
14 years 2 weeks 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
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 weeks 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

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

More
14 years 2 weeks ago #88163 by James Synbian
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
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 weeks 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.

More
14 years 2 weeks 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.

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

  • BNR Investment Group
  • BNR Investment Group's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 2 weeks 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.

More
13 years 9 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

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


Powered by Kunena Forum