Wedge

Public area => Features => The Pub => Features: Theming => Topic started by: Nao on May 9th, 2011, 06:36 PM

Title: Template macros
Post by: Nao on May 9th, 2011, 06:36 PM
Feature: Macros
Developer: Nao
Target: themers, users
Status: 95% (believed to be complete. May need to add features later)
Comment:

Wedge allows skins to define macros in the index template, i.e. blocks of HTML code that you can customize on the fly. You can then call them through <we:yourmacro yourparams="...">Your body</we:youmacro> in all templates. Skins can then override these macros easily.
You can set macros conditionally, i.e. have a macro show up only for members or guests, have another macro show in a certain way to IE6 users and another way to users of other browsers, etc. It's pretty powerful all in all.

Macros available at press time: category, title and title2 headers, block (regular box with optional header and footer), and various wrappers needed for proper sidebar handling.
Title: Re: Template blocks
Post by: [Unknown] on June 19th, 2011, 10:27 AM
Sounds like this is using TOX-G or some variant of it, then?

-[Unknown]
Title: Re: Template blocks
Post by: Dragooon on June 19th, 2011, 12:42 PM
Actually AFAIK it is using a far simpler concept, basically search and replace at session rewrite based on defined patterns in template_init.
Title: Re: Template blocks
Post by: Nao on June 19th, 2011, 03:40 PM
Or defined on the settings.XML override file yes.
It is simplistic but it's a good compromise.
Of course ideally I'd be using tox but I'm not sure themers wouldnt be lost. There are so many changes in Wedge already.
Posted: June 19th, 2011, 03:38 PM

Oh. And I believe there are several private topics regarding the birth of this feature and comparisons with tox.
Title: Re: Template blocks
Post by: [Unknown] on June 19th, 2011, 04:33 PM
Quote from Nao/Gilles on June 19th, 2011, 03:40 PM
Or defined on the settings.XML override file yes.
It is simplistic but it's a good compromise.
Of course ideally I'd be using tox but I'm not sure themers wouldnt be lost. There are so many changes in Wedge already.
Posted: June 19th, 2011, 03:38 PM

Oh. And I believe there are several private topics regarding the birth of this feature and comparisons with tox.
I see it in the post now, sorry for missing.  Was just asking.

-[Unknown]