-
AuthorPosts
-
pavit Moderator
pavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 11, 2015 at 6:10 am #683058Hi 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
1 user says Thank You to pavit for this useful post
pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 11, 2015 at 6:10 am #748195Hi 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
1 user says Thank You to pavit for this useful post
hbic Friendhbic
- Join date:
- June 2015
- Posts:
- 189
- Downloads:
- 15
- Uploads:
- 5
- Thanks:
- 61
- Thanked:
- 6 times in 1 posts
September 11, 2015 at 2:09 pm #683294I 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 Friendhbic
- Join date:
- June 2015
- Posts:
- 189
- Downloads:
- 15
- Uploads:
- 5
- Thanks:
- 61
- Thanked:
- 6 times in 1 posts
September 11, 2015 at 2:09 pm #748252I 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 Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 11, 2015 at 2:50 pm #683304Hi
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 Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 11, 2015 at 2:50 pm #748262Hi
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 Frienddocmedia
- Join date:
- October 2010
- Posts:
- 36
- Downloads:
- 4
- Uploads:
- 5
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
January 19, 2016 at 10:26 pm #858459I 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.
-
AuthorPosts
This topic contains 21 replies, has 4 voices, and was last updated by docmedia 8 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum