Owen, thanks for clearing that up.
I now understand what you're trying to implement/consider – which I
agree with.
What about a hybrid approach? We maintain the current template/page
(WP) based model, but also provide helper functions to use different
templates for different posts.
Maybe it's something as simple as creating a helper to output the
correct template for a post. <?php Theme::post_template($post); ?>
This would look for the appropriate template (for the post type/
request/etc.) and output it.
That way we keep the flexibility of WP while adding the content-type
power of Drupal.
On Oct 16, 2008, at 6:51 PM, drzax wrote:
>
> I'm really glad you cleared that up Owen. I don't know anything about
> how Drupal themes work, but the advantages you describe will be
> desired (by me - an I'm sure many others). For example, I want to
> import my Twitter content into my (still hypothetical) Habari blog and
> have them displayed in the timeline (or other multiple 'post' pages)
> but styled differently.
>
> There are ways to do that now, obviously, but I'm sure we can come up
> with more elegant solutions.
>
> Simon
>
> On Oct 16, 9:24 pm, Owen Winkler <[EMAIL PROTECTED]> wrote:
>> Arthus Erea wrote:
>>> I think a whole theme engine is the best approach for compatability,
>>> rather than a one-time translator.
>>
>> I think there is some misunderstanding of what I meant by this:
>>
>>
>>
>>>>> * Is there a way to provide both WordPress and Drupal-style theme
>>>>> systems?
>>
>> What I meant is that these two systems approach themes in different
>> ways.
>>
>> WordPress (and currently Habari) produces a full-page template for
>> each
>> request condition. So if your request is for a single post, it
>> loads up
>> single.php and uses that to display the whole page. Header and
>> footer
>> must be included from each template called this way.
>>
>> Drupal produces a single page template, and then fills its content
>> area
>> based on the request. So in Drupal, you have a page.tpl.php which is
>> the "wrapper", and inside it there is a $content variable that is
>> output. The value of $content is assigned based on the request.
>> Different nodes (posts in Drupalese) are rendered using the
>> node.tpl.php
>> template and then assigned into $content for display. If a
>> node-{type}.tpl.php template is supplied for a given content type,
>> that
>> template is used instead of the default.
>>
>> Both systems have distinct advantages. The WordPress style is handy
>> when you want the whole page look to change based on the type of
>> request. This is harder to do in Drupal (you can, it just requires
>> code
>> an knowhow that your average WP themer wouldn't fathom). But the
>> Drupal
>> method is nice when you want to style different kinds of posts
>> differently in a multiple-item listing, something that the WP method
>> doesn't support without explicit switches inline in the template
>> files.
>>
>> What would be ideal, in my mind, is to concoct a way to handle
>> either of
>> these styles of theme building so that either WordPress or Drupal
>> themers could fall into Habari themes more naturally with what they
>> expect. Using the best of both could lead to a remarkably flexible
>> system.
>>
>> To be clear, the question above has nothing to do with translating
>> WordPress and Drupal themes via some theme engine into something
>> Habari
>> can use.
>>
>> Owen
> >
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---