Menu

#25 Auto selection of 1,2 or 3 col templates

closed-accepted
nobody
None
5
2002-01-15
2002-01-07
No

Changes to index.php3 and articles.php3 to allow them
to automatically choose between four templates
depending on which columns are present:
Columns Template used
center index1col.tpl
center, left index2colleft.tpl
center, right index2colright.tpl
center, left, right index3cols.tpl

block.class and block_i.class are changed to default to
width = 100% rather than 210 so that blocks work in the
center column.

All files are in the attached zip:
- articles.php3.patch
notes
1. I put related links in the center column, but this
is easily changed back to putting them in the righ column)
2. article.php3 now uses slashHead() and slashFoot()
- index.php3.patch
- block.php3.patch (contains block_i patch too).
Some of the changes are whitespace fixes or extra
debug()s which might need removed before posting.
- *.tpl - the new template files

The following files are superseded: index.tpl
index3col.php3

It might be worth allowing the option of positioning at
center_top and center_bottom (ie above and below the
article).

Also blockAdmin.php3 could be changed to give a
drop-down list of possible column positions.

Comments welcome!

Thanks
Peter

Discussion

  • Peter Cruickshank

    php patches and associated tpls

     
  • Joe Stewart

    Joe Stewart - 2002-01-15
    • status: open --> closed-accepted
     
  • Joe Stewart

    Joe Stewart - 2002-01-15

    Logged In: YES
    user_id=77269

    Added changes to cvs.

     

Log in to post a comment.