Welcome, guest!  |   Login  |  
Close

Login to Your Account


  |  » Forgot your password?
Join

Thread: WM-ImagePath noLink glitch

 
Tools Search
  #1  
Old November 26th, 2010, 07:38 PM
Newbie
Join Date: November 26th, 2010
Posts: 2
I am having some issues with WM-ImagePath. I am not generating Detail Pages, only an index page. If I use the code:

[WM-ImagePath: Photo]

I get:

<a href="" ><img src="/gallery/photo1.jpg" border="0" ></a>

I want a link but the URL is in the database. I don't want the deprecated border attribute. Can I shut that off? Also, I need an alt attribute to make this valid HTML.

Next I try the noLink option:

[WM-ImagePath: Photo noLink]

which produces:

<img src="/gallery/photo1.jpg" border="0" noLink>

What!? Not only the border attribute but it leaves the noLink in there, which is invalid HTML. I understand that it will work, but I have too much self respect to put that out there. Shouldn't it leave the link out automatically since I am not generating Detail Pages?

In the end I had to write the whole thing myself:

<a href="[WM-Field: Link]"><img src="[WM-Field: Photo]" alt="[WM-Field: Name]"/></a>

Which gives me what I want:

<a href="/article/one"><img src="/gallery/photo1.jpg" alt="Article One"/></a>

Is this what I have to do, or am I missing something? Is there a way to use the WM-ImagePath and get valid HTML out?

Thanks,
Phil.

Last edited by PhilA; November 26th, 2010 at 07:39 PM.
  #2  
Old November 27th, 2010, 07:21 AM
ABW Ambassador
Join Date: October 14th, 2007
Location: MA
Posts: 1,888
Quote:
Originally Posted by PhilA View Post

In the end I had to write the whole thing myself:

<a href="[WM-Field: Link]"><img src="[WM-Field: Photo]" alt="[WM-Field: Name]"/></a>

Which gives me what I want:
Great job. Thanks!

I think your solution is great since you put the alt tag in there and eliminates the rest. Didn't even noticed that the "nolink" text was in the img src until I viewed source just now. Been a while since I played around with this.
  #3  
Old November 27th, 2010, 08:58 AM
Affiliate Manager
Join Date: January 18th, 2005
Posts: 1,894
Good work, Phil.

As noted in the WebMerge FAQ the WM-ImagePath tag is a useful convenience as a quick way to add images to a page, but for more options using the WM-Field tag within your own IMG tag gives you complete control over the presentation.
__________________
--
Richard Gaskin
Developer of WebMerge: Publish any data feed on any site
http://www.fourthworld.com
Join ABW to remove this sponsored message.
  #4  
Old November 27th, 2010, 02:06 PM
Newbie
Join Date: November 26th, 2010
Posts: 2
Okay, if that is what I have to do. Thanks for your replies. I was hoping that I missed something.

My actual code gets much worse because I may or may not have a photo. If there is a photo, there may or may not be a link. If there is a photo, I want to alternate between two class values so the photo will alternate between float:left and float:right.

Not to mention, that i have to prefilter my CSV file to remove records that I don't want to include. My first attempt was to wrap the whole thing in an if statement to decide if I wanted to include that record. Then, I could not have an if statement inside! Yikes! That sent me to to forums.

I figured it all out but without nested WM-If's it is pretty messy. Richard, I do hope you include nested ifs in the next major release. Please, please...

I have to say, that WebMerge has filled a need for me. The one monthly task that I am using it for was well worth the purchase price. I am sure I will find other places to use it as well.

Phil.
  #5  
Old December 7th, 2010, 08:30 AM
Affiliate Manager
Join Date: January 18th, 2005
Posts: 1,894
Quote:
Originally Posted by PhilA View Post
My actual code gets much worse because I may or may not have a photo. If there is a photo, there may or may not be a link. If there is a photo, I want to alternate between two class values so the photo will alternate between float:left and float:right.
That's a very interesting case. Could I trouble you to send me the HTML template you're currently using? While I'm not certain I'll be able to simplify things for that, I'll take a look and see if I can come up with something that will be of use to a good many people for similar circumstances.

Quote:
I figured it all out but without nested WM-If's it is pretty messy. Richard, I do hope you include nested ifs in the next major release. Please, please...
I've been doing some R&D on nested IFs, and while it's doable it would take a bit of a memory hit. It probably won't be added to WM until v3.5 at the earliest, as there's much to do in other areas of the program that take priority, but I'm working on it.
__________________
--
Richard Gaskin
Developer of WebMerge: Publish any data feed on any site
http://www.fourthworld.com
Reply

Tags
nolink, wm-imagepath

Tools Search
Search:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking an ImagePath dpdiaz WebMerge (Fourthworld.com) 3 September 9th, 2010 06:22 PM
link vs nolink FourthWorld WebMerge (Fourthworld.com) 3 November 14th, 2004 10:33 AM
Linking noLink Images kbrennan@usa.net WebMerge (Fourthworld.com) 10 September 14th, 2004 03:21 PM
Resizing an image with WM-ImagePath tag billbam WebMerge (Fourthworld.com) 1 June 11th, 2004 07:26 PM
Feedback of nolink attribute FourthWorld WebMerge (Fourthworld.com) 12 February 4th, 2004 08:42 PM

X

Welcome to ABestWeb.com

Create your username to jump into the discussion!

ABestWeb.com is the largest affiliate marketing community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?



Content Relevant URLs by vBSEO ©2011, Crawlability, Inc.