[pmwiki-users] Custom Markup Setup for <div class= ?
Guillermo Calderon - INCO
calderon at fing.edu.uy
Tue Jul 3 13:14:27 CDT 2007
Matt Simpson wrote:
>
> I'm trying to enable the sidebar with custom html to take advantage of
> our internal css.
>
> ## Basic left nav examples in an html file
> ## <div class="top-level"><a id="site-home"
> href="Home">http://mysite.com">Home <http://mysite.com> link</a></div>
> ## <div class="top-level"><a href="Link">http://mysite.com">Link
> <http://mysite.com> 1</a></div>
> ## <div class="second-level"><a class="open"
> href="Link">http://mysite.com">Link <http://mysite.com> 1</a></div>
> ## <div class="third-level"><a href="Link">http://mysite.com">Link
> <http://mysite.com> 1</a></div>
>
> I thought perhaps that custom markup is the way to go. To do even the
> top-level, I tried adding
> this to the local/config.php
>
> Markup("toplevel", "inline", "/`(.*?)`/", "<div
> class="top-level">$1</div>");
>
You must escape inner double quotes (with backslash) or change them by
simple ones:
..., "<div class= 'top-level'>$1</div>");
^ ^
However, I advice you to use nested lists. It is cleaner and you can
achieve the same effects with approppriate CSS.
The sidebar looks like this:
>>navmenu<<
* First level A
* Fist level B
** Second Level A
** Second Level B
* First Level C
...
>><<
and the CSS migh be something like this:
.navmenu ul li {
/* first-level properties here */
}
.navmenu ul ul li {
/* second-level properties here */
....
}
More information about the pmwiki-users
mailing list