We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28456
    • 83 Posts
    Can i use a one TV for output a image and a string?

    for example:
    original code

    <!--code without TV's-->
    <div class="col-sm-2 sm-margin-bottom-30">
        <a href="assets/img/main/img1.jpg" rel="gallery3" class="fancybox img-hover-v1" title="Image 1">
           <span><img class="img-responsive" src="assets/img/main/img1.jpg" alt=""></span>
         </a>
    </div>
    
    <!--code with TV's-->
    <div class="col-sm-2 sm-margin-bottom-30">
        <a href="[[*stringTV]]" rel="gallery3" class="fancybox img-hover-v1" title="Image 1">
           <span>[[*imageTV]]</span>
         </a>
    </div>


    is this possible?

    Stefan
      • 17301
      • 932 Posts
      You could potentially use the stringtv to output both by using this?

      <div class="col-sm-2 sm-margin-bottom-30">
          <a href="[[*stringTV]]" rel="gallery3" class="fancybox img-hover-v1" title="Image 1">
             <span><img class="img-responsive" src="[[*stringTV]]" alt=""></span>
           </a>
      </div>
      
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 52618
        • 10 Posts
        eveningcoffee Reply #3, 9 years ago
        You could use an ImagePlus TV - http://jako.github.io/ImagePlus/
        Have two chunks; one for the string and one for the src.

        [[ImagePlus?
        &tvname=`YOURTV`
        &type=`tpl`
        &tpl=`ImageStringTpl`
        ]]
        [[ImagePlus?
        &tvname=`YOURTV`
        &type=`tpl`
        &tpl=`ImageTpl`
        ]]
        

        ImageStringTpl
        [[+url]]
        

        ImageTpl
        <img src="[[+url]]"/>
        


        More info here - http://jako.github.io/ImagePlus/

        Hope this helps.
          • 28456
          • 83 Posts
          @LK Thanks that is a quick and easy solution