test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • michaelbanks Friend
    #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.5

    Sherlock Friend
    #287437

    Dear 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;
    }
    ?>

    michaelbanks Friend
    #287441

    That 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

    michaelbanks Friend
    #287443

    Just 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.

    michaelbanks Friend
    #289634

    Hi,

    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

    michaelbanks Friend
    #289650

    OK, 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

Viewing 6 posts - 1 through 6 (of 6 total)

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