Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-20 20:44:25

minusf
Member
Registered: 2005-02-15
Posts: 104

two-column for bilingual pages

hi there,

i am trying to move this site to txp.
to signify that both languages are equally important the original design
was to put the identical texts side by side using good ol’ tables, like here .

i am quite at a loss how to do the same using css/textile.
i could make two 50% wide div’s in the presentation part,
but how do i get the texts to appear in those particular divs
from content/article side?


we is experts™

Offline

#2 2006-04-21 05:54:51

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: two-column for bilingual pages

minusf wrote:

i am quite at a loss how to do the same using css/textile.
i could make two 50% wide div’s in the presentation part,
but how do i get the texts to appear in those particular divs
from content/article side?

I would think that you can achieve that in 2 ways.
a. One div reads the <code><txp: article /></code> and the other reads <code><txp: excerpt /></code>.
b You have the columns divs in your “write” tab.

I guess it depends who’s going to be updating the site and their level of xhtml


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2006-04-24 09:12:20

minusf
Member
Registered: 2005-02-15
Posts: 104

Re: two-column for bilingual pages

thanks for the ideas…

a. is interesting :) but i think would be most confusing for my lady editor.
b. seems ok, but txp does not really “encourage” putting div’s into the article, does it? as far as i know, textile doesn’t even have a div “command”.

i’ll try to go with b. what a challenge! :)


we is experts™

Offline

#4 2006-04-24 09:34:55

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: two-column for bilingual pages

Going out on a limb here, but here’s a thought. This probably won’t work, but…

1) post the first language to it’s own category (language1)
2) immediately after, post the other language version to its own category (language2)
Just make sure the time stamps are similar…I think.

The page template might look like this:

<code>
<div id=“container”>

<div id=“language1”>
<txp:article category=“language1” limit=“1” />
</div>

<div id=“language2”>
<txp:article category=“language2” limit=“1” />
</div>

</div>
</code>

CSS:
<code>
#container {
width: 80%; /*or something*/
margin: 1em auto;
}
#language1 {
width: 49%;
float: left;
}
#language2 {
width: 50%;
float: right;
}
</code>

——

Here’s a really ugly solution, just for kicks. Place a frame on the right for the translated article. Have the frame source as http://translate.google.com/language/<txp:article_url /> (a made up tag). That’s what I call innovative :P.

Offline

#5 2006-04-24 13:56:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: two-column for bilingual pages

b. seems ok, but txp does not really “encourage” putting div’s into the article, does it? as far as i know, textile doesn’t even have a div “command”.

Hi minusf
It might not have it but it allows you to manually insert it. It depends how comfortable your client is with some simple xhtml

ie
<code><div class=“lang1”>content…</div>
<code><div class=“lang2”>content2…</div></code>


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2006-04-24 14:41:30

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: two-column for bilingual pages

Seems like option A would be ideal, as it keeps the article grouped as one item, rather than having to deal with duplicate IDs, text-only URLs and editing areas.

it would also allow for you to create the division between the articles in the Article form.

If you can get your editor used to the idea, I think it would be functionally and administratively superior.

Offline

#7 2006-04-25 21:29:16

minusf
Member
Registered: 2005-02-15
Posts: 104

Re: two-column for bilingual pages

It might not have it but it allows you to manually insert it. It depends how comfortable your client is with some simple xhtml
ie
<code><div class=“lang1”>content…</div>
<code><div class=“lang2”>content2…</div></code>

the problem is, that this works fine as long as there are no paragraphs
or some other more complicated constructs inside the div. as soon
as i put something more in, txp fills in p’s everywhere, even surrounds
the div’s with it.

it seems that the exceprt/article approach is better, but i’ll keep playing with it.


we is experts™

Offline

#8 2006-04-25 21:53:48

minusf
Member
Registered: 2005-02-15
Posts: 104

Re: two-column for bilingual pages

call me a html/css traitor, but the table approach is not bad either :)
i guess it’s just one of those cases when the table layout is simply
easier and better. i might be wrong of course…


we is experts™

Offline

#9 2006-04-26 05:41:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: two-column for bilingual pages

Hi minusf

the problem is, that this works fine as long as there are no paragraphs
or some other more complicated constructs inside the div. as soon
as i put something more in, txp fills in p’s everywhere, even surrounds
the div’s with it.

textile does not wrap with a p if you leave a space in front of the first word.

it seems that the exceprt/article approach is better, but i’ll keep playing with it.

I would tend to agree with you as it will be easier to maintain. As excerpts are included in the feeds it would be a choice for you about which language you wish to syndicate your site with


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2006-04-26 05:47:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: two-column for bilingual pages

minusf wrote:

call me a html/css traitor, but the table approach is not bad either :)
i guess it’s just one of those cases when the table layout is simply
easier and better. i might be wrong of course…

You could emulate divs to present like a table. in its bare bones what I would I understand you need is 2 floating divs 48% width each. As simple as a table. For titles of articles (not mentioned in your queries) you could use custom fields (having in mind that they are not included in the search).


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB