-
AuthorPosts
-
January 19, 2009 at 11:46 am #137247
Hello all,
I want to use the JA News module slightly differently than it is currently set up, and wondered whether this is possible??
I and to display the categories description, not the news articles under the category on the front page, and then under that will display the category articles.
Does anyone know how to go about doing this?
Thanks,
Michael
http://www.ambassadorpress.co.uk/index.php
Joomla v 1.5Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
January 21, 2009 at 9:21 am #287437Dear michaelbanks !
yes, it it posible , you can do it following way below :
Open blog_item.php file in templatesja_uvitehtmlmod_janews folder, find following code section at about line 53 :
<?php
if($maxchars > strlen($row->introtext1)) {
echo $row->introtext;
} else {
echo $row->introtext1;
}
?>
change to :
<?php
if($maxchars > strlen($row->introtext1)) {
echo $row->catdesc;
} else {
echo $row->catdesc;
}
?>
January 21, 2009 at 9:37 am #287441That is great, works a treat, apart from it still takes an image from an article under each section, and does not resize the image I have in the category description.
Is there any way of getting rid of the first image and resize the second one??
http://www.ambassadorpress.co.uk/index.php
Much appreciated.
Michael
January 21, 2009 at 9:38 am #287443Just noticed, also when I click the READ MORE link for each category description, it takes me through to the article relating to the first image. Can this also be changed?
Thanks.
February 5, 2009 at 8:01 am #289634Hi,
I notice you have marked the thread as answered, but there is still an issue as outlined above.
Any help would be much appreciated.
Thanks
Michael
February 5, 2009 at 8:44 am #289650OK, have been trying to work through this myself, and have managed to get the title to display correctly and link through to the category rather than the article, but I still have an issue with the article image being displayed, and the category image being displayed but at the wrong size, and also the read more link linking through to an article not the category.
I think the piece of code that requires changing is…
<?php
$i = 0;
while($i < $introitems && $i<count($rows)) {
$row = $rows[$i];
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
$image = modJANewsHelper::replaceImage ($row, $img_align, $autoresize, $maxchars, $showimage, $img_w, $img_h, $hiddenClasses);
//Show the latest news
?>but I cannot figure out how to get it to link to the category description instead of the articles.
Any thoughts??
Thanks.
Michael
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by michaelbanks 15 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum