Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • tgtff Friend
    #154173

    I have inserted 3 columns and 1 image per column in the frontpage blog layout. For each image, I attached a URL. However none of the images can be clicked.

    I checked these posts but they are related to Joomlart modules (http://www.joomlart.com/forums/topic/navigation-links-not-clickable/, http://www.joomlart.com/forums/topic/can-images-be-clickable/, http://www.joomlart.com/forums/topic/linked-imagelike-article-title-in-ja_news-and-ja_news_fp/).

    Any ideas why this wouldn’t work with a plain article image on the home page for this template?

    Thanks,

    Saguaros Moderator
    #355296

    Hello

    In the overriding layout of the front page, the layout automatic find a image and display it on the left of each row, and has a fixed width. if you can disable this feature, but something will work wrong. so that i recommend you should not modify,

    find code in here : templatesja_socialhtmlcom_contentfrontpagedefault_item.php
    [PHP]
    <?php
    //get images
    $regex = ‘#<img[^>]*>#’;
    $image = ”;
    if (preg_match ($regex, $this->item->text, $matches)) {
    $image = $matches[0];
    $this->item->text = str_replace ($image, ”, $this->item->text);
    }
    ?>
    [/PHP]

    tgtff Friend
    #355428

    Hi, sorry I probably should have been clearer: when I said I added columns, I meant I configured the home page “menu” settings to be 3 columns. I didn’t insert a table in the frontpage articles.

    Can you confirm the code above is the right solution for this?

    Saguaros Moderator
    #355750

    As you said: <em>@tgtff 193889 wrote:</em><blockquote> links attached to images in frontpage body layout aren’t clickable </blockquote>, you would like to make a link for image of k2 item, ( this does not relate with setting of column ). so you will remove the above code to resolve this issue

    tgtff Friend
    #356020

    Thanks. So is there no way to keep the alignment left and allow images to have links on the frontpage?

    If not, then I’ll just have to remove the frontpage body layout and show the images a different way like modules. How do I remove the frontpage body layout (white background, curved border, shadow) without removing the body layout for all the other pages?

    Saguaros Moderator
    #356181

    <em>@tgtff 194654 wrote:</em><blockquote>Thanks. So is there no way to keep the alignment left and allow images to have links on the frontpage?

    If not, then I’ll just have to remove the frontpage body layout and show the images a different way like modules. How do I remove the frontpage body layout (white background, curved border, shadow) without removing the body layout for all the other pages?</blockquote>

    oh, i had an other solution better than :). you open the file: templatesja_socialhtmlcom_contentfrontpagedefault_item.php and find the following code:

    [PHP]
    <?php
    //get images
    $regex = ‘#<img[^>]*>#’;
    $image = ”;
    if (preg_match ($regex, $this->item->text, $matches)) {
    $image = $matches[0];
    $this->item->text = str_replace ($image, ”, $this->item->text);
    }
    ?>
    [/PHP]
    and replace:
    [PHP]
    <?php
    //get images
    $regex = ‘#<img[^>]*>#’;
    $image = ”;
    if (preg_match ($regex, $this->item->text, $matches)) {
    $tmp = $matches[0];
    $this->item->text = str_replace ($tmp, ‘<div class=”article-image”>’.$tmp.$this->item->event->beforeDisplayContent.”</div>”, $this->item->text);
    }
    ?>
    [/PHP]

    2) find:

    <div class=”article-content fp-article-content”>

    replace:

    <div class=”article-content fp-article-content my-layout”>

    and add the following code into the template.css file:

    .my-layout {
    padding:0!important;
    }
    .my-layout .article-image {
    padding-right:12px;
    }
    .my-layout .article-image img {
    margin:5px 0px;
    }

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

This topic contains 6 replies, has 2 voices, and was last updated by  Saguaros 13 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum