test
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • stanolejarz Friend
    #681856

    Hi is it possible to add a link to an image in the feature intro style 2 module.

    Best
    Stan

    pavit Moderator
    #681882

    Hi

    You can try to customize it as showed HERE Insted of title you can try to change image

    pavit Moderator
    #747600

    Hi

    You can try to customize it as showed HERE Insted of title you can try to change image

    stanolejarz Friend
    #681888

    Hi Pavit. when i tried it exactly as described it worked perfectly, I creating a link for the text.

    But I want a link from the image so I changed all the “titles” in the code to “image”. and it didn’t work. The option showed up in the module but did not create a link from the image. here is what I did.

    1- I added a new field to the xml file. I changed this code

    <item name=”title-link” type=”text” default=”” label=”TITLE_LINK_LABEL” description=”TITLE_LINK_DESC” />

    to

    <item name=”image-link” type=”text” default=”” label=”IMAGE_LINK_LABEL” description=”IMAGE_LINK_DESC” />

    THEN in the php file I substituted this code

    <?php if($helper->get(‘data.title’, $i)) : ?>
    <h3><?php echo $helper->get(‘data.title’, $i) ?></h3>
    <?php endif ; ?>

    with this

    <?php if($helper->get(‘data.image’, $i)) : ?>
    <h3><?php echo $helper->get(‘data.image’, $i) ?></h3>
    <?php endif ; ?>

    basically swapping every “title” with “image”.

    IS this correct?

    plase advise
    Stan

    stanolejarz Friend
    #747606

    Hi Pavit. when i tried it exactly as described it worked perfectly, I creating a link for the text.

    But I want a link from the image so I changed all the “titles” in the code to “image”. and it didn’t work. The option showed up in the module but did not create a link from the image. here is what I did.

    1- I added a new field to the xml file. I changed this code

    <item name=”title-link” type=”text” default=”” label=”TITLE_LINK_LABEL” description=”TITLE_LINK_DESC” />

    to

    <item name=”image-link” type=”text” default=”” label=”IMAGE_LINK_LABEL” description=”IMAGE_LINK_DESC” />

    THEN in the php file I substituted this code

    <?php if($helper->get(‘data.title’, $i)) : ?>
    <h3><?php echo $helper->get(‘data.title’, $i) ?></h3>
    <?php endif ; ?>

    with this

    <?php if($helper->get(‘data.image’, $i)) : ?>
    <h3><?php echo $helper->get(‘data.image’, $i) ?></h3>
    <?php endif ; ?>

    basically swapping every “title” with “image”.

    IS this correct?

    plase advise
    Stan

    pavit Moderator
    #682859

    Hi there

    I can suggest to use the solution i proposed above and modify module to have link into title as suggested HERE

    adding a link into image means rewrite the whole module code

    pavit Moderator
    #748102

    Hi there

    I can suggest to use the solution i proposed above and modify module to have link into title as suggested HERE

    adding a link into image means rewrite the whole module code

    hbic Friend
    #682987

    What stanolejars described here is what I would also like to do with a Feature Intro Style 1.
    I copied style-1.xml & style-1.xml to style-12.* and followed the instructions you linked to. Style 12 now gives me the ability to hyperlink the feature description, but I want all elements of the feature to be linked to the same content.

    I’m not a developer, but ‘rewrite whole module code’ to achieve this sounds like a difficult task.

    hbic Friend
    #748137

    What stanolejars described here is what I would also like to do with a Feature Intro Style 1.
    I copied style-1.xml & style-1.xml to style-12.* and followed the instructions you linked to. Style 12 now gives me the ability to hyperlink the feature description, but I want all elements of the feature to be linked to the same content.

    I’m not a developer, but ‘rewrite whole module code’ to achieve this sounds like a difficult task.

    pavit Moderator
    #682988

    @hbic @stanolejarz

    I solved in another thread this problem using a workaround , you can try to do in the same way HERE is my trick

    Clearly what should be changed is this block

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

    and not the <div class=”font-icon”>

    pavit Moderator
    #748138

    @hbic @stanolejarz

    I solved in another thread this problem using a workaround , you can try to do in the same way HERE is my trick

    Clearly what should be changed is this block

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

    and not the <div class=”font-icon”>

    hbic Friend
    #682996

    I’ve configured my style-12.php file as your directions at the link said and attached a screenshot for your review.
    I took your directions literally. I haven’t uploaded the file and tried it, yet.

    Edit: After rereading the thread it seems you have to put the actual link into the PHP code, am I correct?

    hbic Friend
    #748146

    I’ve configured my style-12.php file as your directions at the link said and attached a screenshot for your review.
    I took your directions literally. I haven’t uploaded the file and tried it, yet.

    Edit: After rereading the thread it seems you have to put the actual link into the PHP code, am I correct?

    stanolejarz Friend
    #683020

    Yes Pavit, this works thank you!

    BUT

    How to I do this if I have 2 images that are each linked to different urls. the page is like a hub with one image as a link to a blog and the second image as a link to a tutorial site.

    Thank you

    Best
    Stan

    stanolejarz Friend
    #748170

    Yes Pavit, this works thank you!

    BUT

    How to I do this if I have 2 images that are each linked to different urls. the page is like a hub with one image as a link to a blog and the second image as a link to a tutorial site.

    Thank you

    Best
    Stan

Viewing 15 posts - 1 through 15 (of 22 total)

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