Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • pavit Moderator
    #683058

    Hi there

    Please make these changes into this file templatesuberacmfeatures-introtmplstyle-2.php where there is the img-icon block

    <?php if($helper->get('data.img-icon', $i)) : ?>
    <div class="img-icon"><a href="<?php echo $helper->get('data.image-link', $i) ?>">
    <img src="<?php echo $helper->get('data.img-icon', $i) ?>" alt="" /></a>
    </div>
    <?php endif ; ?>

    In this file templatesuberacmfeatures-introtmplstyle-2.xml add the image-link

    <field name="data" type="jalist" >
    <item name="font-icon" type="text" default="" label="FEATURES_FONT_AWESOME_LABEL" description="FEATURES_FONT_AWESOME_DESC" />
    <item name="img-icon" type="media" default="" label="FEATURES_IMAGE_LABEL" description="FEATURES_IMAGE_LABEL_DESC" />
    <item name="title" type="text" default="" size="40" label="FEATURES_TITLE_LABEL" description="FEATURES_TITLE_DESC" required="1" />
    <item name="description" type="textarea" default="" label="FEATURES_DESCRIPTION_LABEL" description="FEATURES_DESCRIPTION_DESC" rows="5" cols="40" />
    <item name="image-link" type="text" default="" size="40" label="Image Link" description="FEATURES_TITLE_DESC" required="1" />

    </field>

    Best regards

    pavit Moderator
    #748195

    Hi there

    Please make these changes into this file templatesuberacmfeatures-introtmplstyle-2.php where there is the img-icon block

    <?php if($helper->get('data.img-icon', $i)) : ?>
    <div class="img-icon"><a href="<?php echo $helper->get('data.image-link', $i) ?>">
    <img src="<?php echo $helper->get('data.img-icon', $i) ?>" alt="" /></a>
    </div>
    <?php endif ; ?>

    In this file templatesuberacmfeatures-introtmplstyle-2.xml add the image-link

    <field name="data" type="jalist" >
    <item name="font-icon" type="text" default="" label="FEATURES_FONT_AWESOME_LABEL" description="FEATURES_FONT_AWESOME_DESC" />
    <item name="img-icon" type="media" default="" label="FEATURES_IMAGE_LABEL" description="FEATURES_IMAGE_LABEL_DESC" />
    <item name="title" type="text" default="" size="40" label="FEATURES_TITLE_LABEL" description="FEATURES_TITLE_DESC" required="1" />
    <item name="description" type="textarea" default="" label="FEATURES_DESCRIPTION_LABEL" description="FEATURES_DESCRIPTION_DESC" rows="5" cols="40" />
    <item name="image-link" type="text" default="" size="40" label="Image Link" description="FEATURES_TITLE_DESC" required="1" />

    </field>

    Best regards

    hbic Friend
    #683294

    I started with a fresh style-1 and applied the changes in your message. I saved it as style-13. I created a new features-intro style-13. The hyperlink field for the image/icon shows up but I’m unable to save the module, I get a pink bar without an error message across the stop. I assumed the link would be applied to the font awesome icon.

    Update: got it! After I typed the last sentence I realized it’s likely the image *must* exist for the new code to be relevant and is generating an error. My assumption the link would be applied the the font awesome icon was wrong.

    hbic Friend
    #748252

    I started with a fresh style-1 and applied the changes in your message. I saved it as style-13. I created a new features-intro style-13. The hyperlink field for the image/icon shows up but I’m unable to save the module, I get a pink bar without an error message across the stop. I assumed the link would be applied to the font awesome icon.

    Update: got it! After I typed the last sentence I realized it’s likely the image *must* exist for the new code to be relevant and is generating an error. My assumption the link would be applied the the font awesome icon was wrong.

    pavit Moderator
    #683304

    Hi

    This code is for style-2 so duplicate a style-2.php file and a style-2.xml file and name them style-22.php and style-22.xml

    I tested it before to post and code is working as requested

    pavit Moderator
    #748262

    Hi

    This code is for style-2 so duplicate a style-2.php file and a style-2.xml file and name them style-22.php and style-22.xml

    I tested it before to post and code is working as requested

    docmedia Friend
    #858459

    I was able to accomplish this (linking an image to article or any other URL) by copying the HTML that the Feature Intro-style-2 Module creates (copied it using Firebug), and then creating a Custom HTML module, pasting the code into it (using NoNumber’s "Sourcer" extension) and assigned it to the same position as the module I wanted to copy.

    Once I had the HTML copied, I could insert links to any part of the Featured Items via the HTML Editor.

    I know that this defeats the purpose of using the ACM Module, but this is way more flexible option, rather than being totally dependent on the available fields in the module settings. Its also would seem to me a better option than hard-coding links into the module files!

    Hope this helps someone.

Viewing 7 posts - 16 through 22 (of 22 total)

This topic contains 21 replies, has 4 voices, and was last updated by  docmedia 8 years, 4 months ago.

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