Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-15 19:07:12

mono
Member
Registered: 2005-01-05
Posts: 12

Placing the Article_Image in a seperate div

I want to put my article_image tag in a seperate div than the article text/comments to avoid IE rendering issues. I know that it’s a bad idea to have two <txp:article> tags on the same page, like this:

<code>
<div id=“graphic”>
<txp:article form=“graphic” limit=“1” />
</div>

<div id=“article”>
<txp:article form=“default” limit=“1” />
</div>
</code>

Is it possible to do this without using two <txp:article> tags?

Last edited by mono (2005-12-15 20:11:21)

Offline

#2 2005-12-15 21:03:06

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Placing the Article_Image in a seperate div

Can’t you put the article_image tag into the default form? I’m not sure what rendering issues you are talking of unless you want to “float” the image but that isn’t a browser problem, it’s a matter of proper “clearing” in the CSS.

Last edited by thebombsite (2005-12-15 21:03:24)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-12-15 21:21:29

mono
Member
Registered: 2005-01-05
Posts: 12

Re: Placing the Article_Image in a seperate div

My webpage is two column, with a floated right div. It has a header section that goes across the entire page.

I want the image to go across the top of the page on the header, and the article text itself to be in the left column. If I put the graphic and the article in the same div it renders fine in safari and firefox, but in IE 6 it shoves the entire div under the floated div. Sorry, it is hard to explain. From what you said, it sounds like the solution is with the CSS code.

Let me know if you need to see more code or anything. Thanks for your help.

Offline

#4 2005-12-15 21:44:53

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Placing the Article_Image in a seperate div

No I understand what you are doing now. In your page template do you have the floated div ( I presume it’s a sidebar?) between the header and the content div?

I’m thinking your best route for this is to go with the two separate tags. It shouldn’t actually be a problem if you are on the latest TXP version. You could always use the article_custom tag for one of them methinks though you would need to specify “section” for that which may pose a problem if your latest article could be in different sections.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-12-16 02:16:15

mono
Member
Registered: 2005-01-05
Posts: 12

Re: Placing the Article_Image in a seperate div

Ok, thanks, although I am not familiar with the article_custom tag.

One of the problems with using two article tags though is that it automatically puts the comments display after the end of the form on my permalink page, which i obviously don’t want to happen with the header graphic.

Offline

#6 2005-12-16 03:18:56

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Placing the Article_Image in a seperate div

You need to specify automatic append = no in the admin prefs :)
Then you will need to adjust your article form so that you get comments where you need them.


Offline

#7 2005-12-16 04:49:30

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Placing the Article_Image in a seperate div

Mmmm. Didn’t think of that. Well spotted Matthew. If you go to “Preferences” and turn “Auto append comments” off then you can add the comment and comment form tags to the default article form template that you are using for the article tag in the main content div. You can see how the tags look by viewing the comments_display form template. That way you can use the normal article tag in your header as well as it uses a different form (graphic).


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2005-12-16 06:12:17

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Placing the Article_Image in a seperate div

Much more detailed explanation than I Stuart. :)

Thorough. Makes for a better forum.

Matthew


Offline

Board footer

Powered by FluxBB