-
AuthorPosts
-
September 5, 2015 at 9:39 pm #681856
Hi is it possible to add a link to an image in the feature intro style 2 module.
Best
Stanpavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 6, 2015 at 3:34 am #681888Hi 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
StanSeptember 6, 2015 at 3:34 am #747606Hi 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
Stanpavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
hbic Friendhbic
- Join date:
- June 2015
- Posts:
- 189
- Downloads:
- 15
- Uploads:
- 5
- Thanks:
- 61
- Thanked:
- 6 times in 1 posts
September 10, 2015 at 6:25 pm #682987What 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 Friendhbic
- Join date:
- June 2015
- Posts:
- 189
- Downloads:
- 15
- Uploads:
- 5
- Thanks:
- 61
- Thanked:
- 6 times in 1 posts
September 10, 2015 at 6:25 pm #748137What 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 Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 10, 2015 at 6:40 pm #682988I 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 Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
September 10, 2015 at 6:40 pm #748138I 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 Friendhbic
- Join date:
- June 2015
- Posts:
- 189
- Downloads:
- 15
- Uploads:
- 5
- Thanks:
- 61
- Thanked:
- 6 times in 1 posts
September 10, 2015 at 8:45 pm #682996I’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 Friendhbic
- Join date:
- June 2015
- Posts:
- 189
- Downloads:
- 15
- Uploads:
- 5
- Thanks:
- 61
- Thanked:
- 6 times in 1 posts
September 10, 2015 at 8:45 pm #748146I’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?
September 11, 2015 at 2:11 am #683020Yes 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
StanSeptember 11, 2015 at 2:11 am #748170Yes 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 -
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