| Previous · Next | |
| User | Message |
|
perlDreamer
|
Date: 1/6/2010 12:45 pm · Subject: div tag around Images in Image assets causing functional and redering issues · Rating: 0
Several sites have been reporting problems after upgrading past 7.7.15, where the new templates where installed. The problems arise from the <div> tag that was added to the default Image Asset template. For example, where users used to do this: <a href="#" removed="javascriptStuff">^AssetProxy(myImageAsset);</a> The div from the image asset causes the anchor tag to have no area. You can see this on PlainBlack.com, with the search button in the top right hand corner. There is a workaround, using the FileUrl macro, but then you lose the asset features like title, parameters, etc. I'd like to revisit the rationale for adding the div, or, to have a set of recommended practices for using the Image Asset with its new templates. |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 1/7/2010 4:06 am · Subject: Re: div tag around Images in Image assets causing functional and redering issues · Rating: 0
I understand the problem. One could argue that in this case a different template should be made, because the main use of the image asset is putting images on a page and there the div is useful for positioning, styling etc. (One could also argue that the image should be a background image, but let's not go there :-) Do you have any more examples? I can't think of anything fundamentally different than this, where the problem is a block element being put inside an inline element.
OK, let's list our options. Option 1: keep the div
Option 2: use a span instead of a div
Option 3: remove the div alltogether (and add the class and id to the img tag)
Regarding a set of recommended practices: let's make a wiki entry anyway, regardless of what we decide. Since the image template either breaks with consistency or it behaves differently from the previous one. In both cases some documentation would be nice.
I would prefer option 1 + documentation, because I find that consistency and flexibility outweigh a few cases of failed backwards compatibility. But 3 would be acceptable I guess: an image is an image is an Image Asset. Any other ideas?
Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|
|
perlDreamer
|
Date: 1/7/2010 11:23 am · Subject: Re: div tag around Images in Image assets causing functional and redering issues · Rating: 0
Actually, I think that what you said is more indicative of the problem. Everyone has their own idea of what the main use for an asset is. WebGUI's very flexibility has allowed people to do design in ways that may not be the best, but certainly work. Now, with the change that has been made, that has been broken.
I think this site is just a variation on the same problem: http://www.yourhomeschoolinganswers.com/
How about option 1a: Option 1a: keep the div, write some documentation, supply a 2nd template for AssetProxy
|
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 1/11/2010 3:15 am · Subject: Re: div tag around Images in Image assets causing functional and redering issues · Rating: 0
Is a good option. The scenario of having an image on an page and in an AssetProxy is probably less likely. And maintaining a template with only an img tag isn't much work at all. And if it should be necessary to use the same image on a page and in an AP, it can be done with a shortcut or uploaded twice. I assume you want a solution that includes a div-less template, because bugs have been reported and "we made a template for you to fix this" would sound much nicer than "you'll have to make new template to fix something that's worked before." So the current template becomes "Image block" (or something similar) and the "Default Image" will be just an img tag: no div, no anchor (you don't need that either if you use it inline). Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|
|
perlDreamer
|
Date: 1/11/2010 9:41 am · Subject: Re: div tag around Images in Image assets causing functionaland redering issues · Rating: 0
rogier@unitedknowledge.nl wrote:> I assume you want a solution that includes a div-less template, because > bugs have been reported and "we made a template for you to fix this" > would sound much nicer than "you'll have to make new template to fix > something that's worked before." > > So the current template becomes "Image block" (or something similar) and > the "Default Image" will be just an img tag: no div, no anchor (you > don't need that either if you use it inline). Thinking out loud: Offhand, I don't know what the most common usage of an Image Asset is, but I would guess that people upload them most frequently for building style templates. For other usages, I'm guessing that people upload to a Gallery, CS, Article or Product Asset. So yes, I agree. The default should be a bare image tag (or we can pull the old template and restore it). However, before we do this, none of the other TWG designers have said anything. Should we wait for more feedback before making bilateral decisions? Colin |
| Back to Top |
Rate [ | ]
|
|
serif
|
Date: 1/11/2010 10:42 am · Subject: Re: div tag around Images in Image assets causing functional and redering issues · Rating: 0
This sounds like the most practical option to me. Tessa Harmon |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 1/11/2010 11:15 am · Subject: Re: div tag around Images in Image assets causing functional and redering issues · Rating: 0
Well, that makes 3 votes in favour of the 2 template solution, so I say go for it. For something small like this it's OK if not everyone is involved, so long as we reach a solution that's well argumented. I guess it would be just as easy if you restore the old default and re-add the newer template under a different name, but if you want me to package them up let me know. I'll write an "Image Asset recommended practices" wiki page this week. Thanks, Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|
|
rogier
|
Date: 1/29/2010 3:34 am · Subject: Re: div tag around Images in Image assets causing functional and redering issues · Rating: 0
http://www.webgui.org/wiki/image-asset-templates Rogier | United Knowledge |
| Back to Top |
Rate [ | ]
|