Keyword

Catergory item view custom views

  • James Anderson
  • James Anderson's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #89636 by James Anderson
Catergory item view custom views was created by James Anderson
Gidday,

Hi have been trying to show multiple instances of the Category item headings on a single page. Having say the six items/articles showing below the main image and the a list of the same (dynamic) headings up the top of the page as well.

Also i have been trying to move a few little things around from the standard place that they sit. An example would be i would like to place the "readmore" link at the end of the introtext text block, which varies in length. Another alternation which is similar to this is place the item heading div hard against the side of the item image.
I have included a pdf that should help show everyone what I am talking about.
Cheers!

James Anderson 

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

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 11 months ago #89637 by Yiota
Replied by Yiota on topic Catergory item view custom views
For the list of articles right next to the category image you can use a mod_k2_content to fetch them. It would be easier. You need to add the module position inside the code of the category.php, right where you want it.

The read more button can be put inside the div container of the introtext. This way you can have it always in comparison with the text.

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

  • James Anderson
  • James Anderson's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #89638 by James Anderson
Replied by James Anderson on topic Catergory item view custom views
Cheers For the reply,
I cant figure out how to get it to call this module position within the category.php file. What sort of thing am i looking to add, you wouldn't have an example would you. I havnt really altered/written much k2 code, so I don't know if I am doing the correct thing.

I got the readmore button and article layouts to work by altering the DIV arrangement though, and it looks great! So im on the last thing of getting that article list to work now1

Thanks for you help
James


Yiota Ziaggou said:For the list of articles right next to the category image you can use a mod_k2_content to fetch them. It would be easier. You need to add the module position inside the code of the category.php, right where you want it.
The read more button can be put inside the div container of the introtext. This way you can have it always in comparison with the text.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 11 months ago #89639 by Yiota
Replied by Yiota on topic Catergory item view custom views
You can put under the category title this code

if(JModuleHelper::getModules('MODULE POSITION')):
div class=""
foreach (JModuleHelper::getModules('MODULE POSITION') as $module) {
echo JModuleHelper::renderModule($module, array('style' => 'xhtml'));
}
div
endif;

This code will check if there is a module published on this page and it will load it.

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

  • James Anderson
  • James Anderson's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #89640 by James Anderson
Replied by James Anderson on topic Catergory item view custom views
Hi,

I must be doing some thing seriously wrong. I put the code in above the the section i want it in. What sort of module call do i need to make in the php file? And then with the joomla administration what do I set it up as? It doesnt seem to be publishing the module position? I can get the Div/position to show but wih no content within it.

I must be blind!

Thanks heaps James

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

  • Yiota
  • Yiota's Avatar
  • Visitor
13 years 11 months ago #89641 by Yiota
Replied by Yiota on topic Catergory item view custom views
Check if the module position is the same in the php code with the one you are publishing the module. Then check the style parameter to be the same with the ones you have for all your site modules, ie.

The module you need to get is a mod_k2_content.

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


Powered by Kunena Forum