Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Vertical Split of content
Avatar
cornelinux #1
Member since Mar 2007 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Vertical Split of content
HEllo,

I am using a modified template and I want to enhance it even more.
I'd like to split the content area 2:1 vertically. To be able to put some text on the left side and some text and pictures on the right side.

Do you think, it would be possible without changin the dokuwiki parser?
I'd like to be very flesible for every page, and maybe have some pages which are a 100%.

But on some pages split the content 66% : 33%.

How could a tag for doing this look like?
What would have to do to enhance the parser or are there other possibilies?

Kind regards
Cornelius
Avatar
3AtÜ #2
Member since Mar 2007 · 29 posts
Group memberships: Members
Show profile · Link to this post
Hi,
I think, you don't have to modify the parser. One solution would be, to write a plugin, that modifies the wiki output.
But have a look at the previous thread. I also had to split the wiki-output into two different div-sections (but I have a constant regex to search).
Perhaps you could enhance it and add a new expression into your wiki-text in which you specify the wanted length (e.g. [33%] or [50%]). When you split the content right there, you also have to add a closing </div> in the first section and an opening <div class ="dokuwiki"> in the second. I think, the preg_split()-command will do.

Got it?
Greetings.
chi #3
Member since Jun 2006 · 1851 posts · Location: Munich Germany
Group memberships: Members, Super Mods, Wiki Managers
Show profile · Link to this post
Hi,

I think the easiest, and IMO more flexible, way to achieve what you want would be to use the div/span shorthand plugin [1]. This way you can define several div classes with a different width and use them in your wiki pages as you want.

Regards
chi

[1] http://wiki.splitbrain.org/plugin:div_span_shorthand
Please add [SOLVED] to the initial thread subject if you feel your question has been answered.
If my answer doesn't make sense maybe your question didn't either - just visit http://facepalm.org.
Avatar
cornelinux #4
Member since Mar 2007 · 6 posts
Group memberships: Members
Show profile · Link to this post
Hello and thanks for the responses,

I tried the div/span plugin.
Maybe my html-knowledge is not extended enought :( but the effect was not that, that I wanted to see...

first, I want to have two columns one on the left an one on the right.

+---------------70 % -----------------+ +------------------+
|   Text with wiki words!         | |   Picture       |
|                                          | | and also       |
|                                          | |  Text           |
+----------------------------------------+ +-----------------+

But I can not manage to get the two columns.

second, all wiki syntax disapears in an div or span. :(

Kind regards
Cornelius
Avatar
cornelinux #5
Member since Mar 2007 · 6 posts
Group memberships: Members
Show profile · Link to this post
Hello,

hej ho!

I wrote my first plugin!

A syntax plugin, that replaces "---bilder---" with "</td><td width=30%>" :-)

Now I got the idea of the plugins... cool

Many thanks for all the hints
Kind regards
Cornelius
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-25, 05:36:32 (UTC +02:00)