Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
Escaping to the top DIV level in a plugin
Avatar
jivit #1
Member since Mar 2007 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Escaping to the top DIV level in a plugin
Hello everyone,

I have created a plugin which I want to insert a h1 title (+plus some other stuff).  I am using a substitution plugin to replace a custom code eg [example].

The problem I have is, if the  code is used after a h2 or h3 header (and above presumably) the inserted h1 title is indented to whatever level it is in.  I want it to be level with all the other h1 titles.


Is it possible to get around this? is it possible to find out how 'deep' you are from within  a plugin (e.g. level?)?

Any thoughts, hints, tips greatly received.

:)
Avatar
esther #2
User title: Esther Brunner
Member since May 2006 · 60 posts · Location: Winterthur, Switzerland
Group memberships: Members
Show profile · Link to this post
Hi Jivit

I had to do the same thing in the Include Plugin for proper indenting. You have to do it manually. Parse previous instructions and find out the level of the last heading. Then close the current div class="leveln", insert your stuff and after you're done, reopen the previous level.

-- esther
Avatar
jivit #3
Member since Mar 2007 · 4 posts
Group memberships: Members
Show profile · Link to this post
Thanks Esther,  I was worried that might be the solution - more work :)
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: 2020-02-26, 15:06:02 (UTC +01:00)