Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2006-09-29 01:08:00
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: r1853 - image tags
I can’t eliminate style yet, for backwards compatibility. Class is still applied, but to a wrapping tag.
Offline
Re: r1853 - image tags
There is something confusing me in this discussion…
[case 1] When I do [ img src="http://127.0.0.1/txptest/images/2.png" width="80" height="80" alt="test image" class="myimage" /], aka use ‘xhtml’ tag in the tagbuilder, the class is outputted correctly, attached to the image tag.
[case 2] But <txp:image class="myimage" id="2" />, using the ‘textpattern’ tag, then it fails to output the class in the image tag.
Case 1 is the behaviour I would want, and what Bert was looking for, I think.
Having a different behaviour for Case 2 is just confusing. Why wouldn’t you want to attach a class to the image tag? This becomes extremely problematic if you want for example to have an image floated left and an image floated right inside a long paragraph. There is no way you can define that in terms of CSS selectors, using syntax like p.myimage img {}.
I’ve always used the markup as in case 1, and that will work fine, Hopefully you won’t take away the parsing of the class attribute on the xhml tag…
Tested at rev 1860.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1853 - image tags
Philippe, I’ll give you my reasoning for using the txp image tag.
Textile: <code>!http://txpun.com/images/4.png (Open Source)!</code>
Textpattern: <code><txp:image id=“4” /></code>
XHTML: <code><img src=“http://txpun.com/images/4.png” width=“120” height=“100” alt=“Open Source” /></code>
If I decide to create another site from a section of TxPun or if I want to test my site locally, the Textpattern tag is portable. It was a relative path in 4.0.3 but now it’s the full url, don’t know why.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#16 2006-09-29 04:04:58
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: r1853 - image tags
Philippe, when would an image appear in the middle of a sentence, as opposed to being a sentence by itself (i.e.: a figure, a pull-quote, a photo…)?
Offline
Re: r1853 - image tags
Mary wrote:
Philippe, when would an image appear in the middle of a sentence, as opposed to being a sentence by itself (i.e.: a figure, a pull-quote, a photo…)?
A paragraph can contain many sentences. Image can be sort of part of the sentence in the narative. Maybe not something for an average 3 sentence blog post, but some people tend to write longer stories.
dummy dummy example
or more live example
@hcgtv
you have a good point there. It makes it more portable.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1853 - image tags
… a smiley icon ;-) is expected in the middle of sentences.
Last edited by wet (2006-09-29 05:08:54)
Offline
#19 2006-09-30 12:38:32
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: r1853 - image tags
- I think a smilie is best suited to a parsing plugin rather than being called from one of the image tags.
- Your examples have no alternate text and are floated left/right, which doesn’t exactly warrant being in the middle of a sentence. ?
- Still, I suppose there might be some instances you’d need that ability. Try r1863.
Offline
Re: r1853 - image tags
Thanks for 1863 Mary.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: r1853 - image tags
hcgtv wrote:
Thanks for 1863 Mary.
idem dito.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: r1853 - image tags
Mary wrote: when would an image appear in the middle of a sentence, as opposed to being a sentence by itself (i.e.: a figure, a pull-quote, a photo…)?
Little late here but I thought I would just say I have written articles where I have talked about interface buttons and put imags of them inline for direct context and absolute understanding.
Arbitrary example: The Sage button, (small image here), shows what is likely a sage leaf, but looks as much like a green feather.
Offline