Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Issues using header both in <HTML> and <WRAP> [solved using "include" as a workaround]
I want a sidebar with headers on my start page
Avatar
lolmaus #1
User title: DokuWiki noobie
Member for a month · 4 posts · Location: Moscow, Russia
Group memberships: Members
Show profile · Link to this post
Subject: Issues using header both in <HTML> and <WRAP> [solved using "include" as a workaround]
Hi!

 

The Goal

My wiki's start page contains welcome to users, introduction to wiki basics, that kind of stuff.

On the start page, i want to have a big custom sidebar. It would serve as a navigation menu and a thoughtfully composed table of contents.

  

Attempt 1: <WRAP>

The <WRAP> tag appears to be the most graceful solution. I've created a custom css class with .width: 45%; padding-left: 5%; float: right; background: #fff; and set it to wrap my table of contents.

It was exactly what i want. The problem is that DokuWiki won't let me have headers inside markup tags, and <WRAP> is not an exception. :(

Wrap plugin page suggests using bold+underline to bring out tags, which is of course not a solution for me.

  

Attempt 2: <HTML>

I substituded <WRAP> with <HTML><div style="blah></HTML>.

It worked if there were no DokuWiki headers inside the div.

When i type in a DokuWiki header, it add "</div>" right before itself, tearing what's below itself off the sidebar.

I tried substituting DokuWiki headers with html ones, but this is a terribly ungraceful solution. The text below html headers doen't get indented, whereas the header itself does.

  

Attempt 3: a Sidebar Template

I tried using a sidebar template. I din't like Actic because it's fixed with and lacks the elegance of DokuWiki default theme. So i chose the navigation template.

The template has really noble goals and it serves them really well.

My problem is that i don't need a sidebar on every page! After a painful period, i finally adopted the nirvana of Dokuwiki's simple approach to navigation.

Moreover, my sidebar's table of contents is gonna be really big. If i have it on every page, it's gonna be longer than most pages' contents.

 

Miserable Failure

So i tried mostly everything and everything failed.

I can think of other solutions of course:
  • coding the sidebar's contents in html/css without using DokuWiki markup;
  • using a plugin to embed a separate page to the start page and apply the float css to it's div.

But come on! Do i really need to install plugins, make page embeds (raising caching issues probably) or wasting time with oldschool html — just to have a simple float with headers?

The question is as follows:

Is the situation really that bad? No graceful solution to such a small problem?
This post was edited on 2010-02-09, 07:57 by lolmaus.
Avatar
ryan.chappelle #2
User title: Chilean DW Fan
Member since May 2008 · 97 posts · Location: Temuco, Chile
Group memberships: Members, Newsletter Team
Show profile · Link to this post
If you want "a simple float with headers", the best option that makes it easily manageable via the wiki itself is to use the include plugin and style the call appropriately (float it, etc). This will in particular solve the issue of the headers, since the contents of the included page (your sidebar or navigation) will be seamlessly managed and integrated by DokuWiki itself (as it should) and you won't have to meedle with it (that much).

Include plugin: http://www.dokuwiki.org/plugin:include
Chilean DW Fan!
→ check my plugins for DokuWiki
GULIX -- Araucania LUG
Surviving earthquakes since Feb 2010!
Avatar
ach (Moderator) #3
Member since May 2006 · 544 posts
Group memberships: Global Moderators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
In reply to post #1
Quote by lolmaus:
Wrap plugin page suggests using bold+underline to bring out tags, which is of course not a solution for me.

Why exactly is that no solution? Can't you live with something that looks like headers (and comes semantically close to them)? Do you need actual headers?
Avatar
lolmaus #4
User title: DokuWiki noobie
Member for a month · 4 posts · Location: Moscow, Russia
Group memberships: Members
Show profile · Link to this post
ryan.chappelle

Hehey! Thank you Ryan, this worked out for me!

The include feature lowers header levels, but this is not a big deal. Now i've got exactly what i needed.


ach

Well, of course i can manage without real headers in TOC.

But your logic works this way: i can also manage without DokuWiki. Write my documentation in text files and distribute them via a corporate e-mail group. No headers problem, no server/engine configuration trouble, lots of time and effort saved.

Or i can go even further and do documentation in paper. Good old paper! Manuscripts don't burn, you know. Mostly no worries about backup and unauthorized access — just keep the papers locked.

I have set myself a number of requirements, aimed at raising the result to a certain level of efficiency, practicalness and convenience. I met an unfortunate problem with one of minor requirements. But i was persistent and (thanks to ryan.chappelle) found a graceful solution that fully meets the requirements.

So the answer to your question is: yes, i can live without dam' headers, but why should i?
Avatar
ach (Moderator) #5
Member since May 2006 · 544 posts
Group memberships: Global Moderators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
Quote by lolmaus:
So the answer to your question is: yes, i can live without dam' headers, but why should i?

I'm not sure if you understood how the emulated headlines work? If you take a look at the example screenshot [http://www.dokuwiki.org/_media/plugin:wrap_plugin_example2…], the actual "headers" reading "Emulated Big Headline" and "Emulated Small Headline" under "Columns and Floats" *are* those emulated headlines.

Great if the include plugin solves your problem.
The real solution would be of course if DokuWiki supported headlines in every kind of plugin syntax. ;-)
Avatar
lolmaus #6
User title: DokuWiki noobie
Member for a month · 4 posts · Location: Moscow, Russia
Group memberships: Members
Show profile · Link to this post
Quote by ach:
I'm not sure if you understood how the emulated headlines work?

Dammmm'! You're right. I seem to have missed the "//" wrapping and got simple bold+underline.

But what i've got here now seems better than emulated headers anyway.

Sorry for being rude, ach.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
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, 20090606-dev, © 2003-8 by Yves Goergen
Current time: 2010-03-22, 11:10:37 (UTC +01:00)
WikiForumIRCBugsGitXRefTranslate