We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

lighbox2 with tokens

Tom
Tom asked
on
Medium Priority
294 Views
Last Modified: 2012-05-11
Hallo experts!
Working on the DNN store module where I like to include lightbox2 on the product picture.
HTML is :
________________________________________
  <p class="Normal">[MANUFACTURER]</p>
  <p class="Normal">[IMAGE]</p>
  <p class="Normal">[MODELNUMBER]</p>
________________________________________

Testing that the lightbox2, is working fine with:
<a href="images/picture1.jpg" rel="lightbox"><img src="images/picture1.jpg" /></a>

What I like to do is this:
<a href=[IMAGE] rel="lightbox"><img src=[IMAGE] /></a>

Result is  : red x picture with the text " rel="lightbox"> />  " on the screen

Any idea how to solve this?
Comment
Watch Question

Kindly try this. i.e. add double quote in href attribute.

<a href="[IMAGE]" rel="lightbox"><img src=[IMAGE] /></a>

TomMicrosoft ISV Partner

Author

Commented:
malikirfan28: Not working same result
TomMicrosoft ISV Partner

Author

Commented:
have also tried this:
<a href="[IMAGE]" rel="lightbox"><img src="[IMAGE]" /></a>
<a href='[IMAGE]' rel="lightbox"><img src=[IMAGE] /></a>
<a href='[IMAGE]' rel="lightbox"><img src='[IMAGE]' /></a>

This is not as staight forward as it looks like

You can try this code. Add a Span element where you want to display image.
<span id="mySpan"></span>

and at the end of document before </body> (body close element) add following javascript code.
<script language="javascript" type="text/javascript">
    document.getElementById("mySpan").innerHTML = "<a href='" + [IMAGE] +"' rel=\"lightbox\"><img src="'+ [IMAGE] +"' /></a>";
</script>
</body>
TomMicrosoft ISV Partner

Author

Commented:
malikirfan28: Same thing don't work
TomMicrosoft ISV Partner

Author

Commented:
Have read about something similar here:
http://drupal.org/node/567918
dont quite understand how to implement
can you please send the HTML (Output code generated in browser) code?
TomMicrosoft ISV Partner

Author

Commented:
<div id="dnn_ctr870_ContentPane"><!-- Start_Module_870 --><div id="dnn_ctr870_ModuleContent" class="Store CatalogContent">
      <div class="StoreCatalogWrapper">
   
   
   
   
    <div class="StoreDetailContainer">
  <div class="StoreDetailContainer-Title"><span class="StoreDetailTitle">Product Details</span></div>
  <div class="StoreDetailContainer-Warning"></div>
  <div class="StoreDetailContainer-Content">
    <p class="Normal"><span class="StoreProductManufacturer">Manufacturer: TT</span></p>
    <p class="Normal"><span class="StoreProductModelNumber">Model Number: 1213899</span></p>
    <p class="Normal"><span class="StoreProductModelName">TT allround</span></p>
    <div class="Normal"><img class="StoreProductImage" src="/DesktopModules/Store/Thumbnail.ashx?IP=/Portals/2/TT/Guide/1213899_1.jpg&amp;IW=300&amp;BC=FFF" alt="Product Image" style="border-width:0px;" /><div class="StoreProductDescription">
            <div class="std">Formet  2706899</div>
      </div></div>

   </br>
</div>
TomMicrosoft ISV Partner

Author

Commented:
Replacing the result in the <a> tag like this in the code works:
    <a href="/DesktopModules/Store/Thumbnail.ashx?IP=/Portals/2/TT/Guide/1213899_1.jpg&amp;IW=300&amp;BC=FFF" alt="Product Image" style="border-width:0px;" rel="lightbox"><img src="/DesktopModules/Store/Thumbnail.ashx?IP=/Portals/2/TT/Guide/1213899_1.jpg&amp;IW=300&amp;BC=FFF" alt="Product Image" style="border-width:0px;" /></a>
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.