Display page at /, blog at /news

4 views
Skip to first unread message

Michael Harris

unread,
Jan 4, 2008, 8:49:44 PM1/4/08
to habar...@googlegroups.com
I need to display a page at / and the blog at /news. I'd like to do it
in the theme. I've had tantalising advice to look at overriding
rewrite rules, but I'm not sure how to go about that.

Any advice would be greatly appreciated.

cheers, Michael

--
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog

Owen Winkler

unread,
Jan 5, 2008, 1:16:46 AM1/5/08
to habar...@googlegroups.com
Michael Harris wrote:
> I need to display a page at / and the blog at /news. I'd like to do it
> in the theme. I've had tantalising advice to look at overriding
> rewrite rules, but I'm not sure how to go about that.
>
> Any advice would be greatly appreciated.

This should work for what you're trying to do on rev 1243.

http://pastoid.com/y

Owen

Michael Harris

unread,
Jan 5, 2008, 2:16:25 AM1/5/08
to habar...@googlegroups.com

And so it does! Thanks very much.

cheers, Michael

Robin Adrianse

unread,
Jan 5, 2008, 1:57:50 PM1/5/08
to habar...@googlegroups.com
This would probably be a great plugin to publish, for I know a lot of people have/would like this setup, plus it's a good example (IMO, at least) of what you can do with the rewrite rules in Habari.

Owen Winkler

unread,
Jan 5, 2008, 2:52:54 PM1/5/08
to habar...@googlegroups.com
Robin Adrianse wrote:
> This would probably be a great plugin to publish, for I know a lot of
> people have/would like this setup, plus it's a good example (IMO, at
> least) of what you can do with the rewrite rules in Habari.

I was hoping to (or was hoping someone else to) write something more
comprehensive and configurable that could be included in core. I'm not
really sure how to approach the interface to such a thing though, since
the output can be so flexible.

Any ideas?

Owen

Christian Mohn

unread,
Jan 5, 2008, 3:12:31 PM1/5/08
to habar...@googlegroups.com
How about a rewrite manager in admin? Somewhere you can make your own rules
and assign them to templates of your choice? Of course, redirecting your
"front page" to a page and place your "blog" at some other location would be
an option here?

Owen Winkler

unread,
Jan 5, 2008, 3:16:06 PM1/5/08
to habar...@googlegroups.com
Christian Mohn wrote:
> How about a rewrite manager in admin? Somewhere you can make your own rules
> and assign them to templates of your choice? Of course, redirecting your
> "front page" to a page and place your "blog" at some other location would be
> an option here?

Yeah, that's a great idea. I'm still struggling with what that
interface looks like.

Does it not matter too much because it's an advanced feature? I don't
expect that everyone knows the difference between the match regex and
the build string and has the knowledge to build both. There's obviously
going to be different levels of this plugin -- A simple one that allows
a few standard changes, and a complex one that lets you edit directly.

Owen

Christian Mohn

unread,
Jan 5, 2008, 6:04:19 PM1/5/08
to habar...@googlegroups.com
I'm no UI guy either. I just had the idea. Now, go forth and implement.

:-)

-----Original Message-----
From: habar...@googlegroups.com [mailto:habar...@googlegroups.com] On
Behalf Of Owen Winkler
Sent: 5. januar 2008 21:16
To: habar...@googlegroups.com
Subject: [habari-dev] Re: Display page at /, blog at /news

Ali B.

unread,
Jan 6, 2008, 6:55:26 AM1/6/08
to habar...@googlegroups.com
I think this is a good idea, but keep in mind that the admin interface will not be managed by real "admins". I mean If we want to go with this and implement it within, then the modification level given to the user should be limited and fail-safe.

We can always provide a smart question for the user before he can enter the "Advanced mode"... wait this is not the game-div list :D

Geoffrey Sneddon

unread,
Jan 6, 2008, 7:55:38 AM1/6/08
to habar...@googlegroups.com

On 5 Jan 2008, at 20:16, Owen Winkler wrote:

>
> Christian Mohn wrote:
>> How about a rewrite manager in admin? Somewhere you can make your
>> own rules
>> and assign them to templates of your choice? Of course, redirecting
>> your
>> "front page" to a page and place your "blog" at some other location
>> would be
>> an option here?
>
> Yeah, that's a great idea. I'm still struggling with what that
> interface looks like.

Does it really matter what colour we paint the bikeshed? Wouldn't it
be nicer just to have a bikeshed in trunk, even if we paint it later?


--
Geoffrey Sneddon
<http://gsnedders.com/>

Owen Winkler

unread,
Jan 6, 2008, 9:32:07 AM1/6/08
to habar...@googlegroups.com

I think you've misunderstood this as a bikeshed issue.

In order to produce this page, I need to know what controls go on it and
what they allow you to change. As of right now, I'm not sure what level
of detail those controls operate at or how they work.

Where they appear on the page, what they look like, what color they
are... Those are bikeshed issues. But first we actually need controls.

Owen

Scott Merrill

unread,
Jan 6, 2008, 11:09:03 AM1/6/08
to habar...@googlegroups.com

Would it be sufficient to provide in core a simple rewrite generator
that only lets you map new addresses to existing ones? In this way,
the end user wouldn't need to know about match regexes or build
strings, and would simply say "I want this content provided at this
URL". Think Drupal aliases: map an existing page to a new address.

An advanced plugin (core or otherwise) could permit more complex
rewrite generation.

Owen Winkler

unread,
Jan 6, 2008, 11:56:53 AM1/6/08
to habar...@googlegroups.com
Scott Merrill wrote:
>
> Would it be sufficient to provide in core a simple rewrite generator
> that only lets you map new addresses to existing ones? In this way,
> the end user wouldn't need to know about match regexes or build
> strings, and would simply say "I want this content provided at this
> URL". Think Drupal aliases: map an existing page to a new address.

I think this function is a good idea, but I can't figure out how to use
it to remap dynamic URLs.

For example, the default rewrites put date-based listings at the URL
/{year}/{month}/{day} It's also a very complex regex that takes into
account URLs that don't include some of the parameters. I don't know
how to map a single new address to that dynamic URL without a regex.

In Drupal, everything assumes a strict hierarchy where the leftmost
portion of the URL is responsible for the primary detection of the URL.
It would be difficult in Drupal to, for example, move the "node" part
of "node/add/page" to make the URL "add/node/page", whereas this would
be possible in Habari because of the regexes.

Maybe it's enough to allow users to add prefixes to the existing URLs?
I think it would be neat to allow anything from "/{year}/{month}/{day}"
to "/archive.{year}-{month}-{day}" to "/{month}/{day}/{year}" but I
don't know where the line is drawn for what we can offer through a
limited interface. There are clearly limited options for users who do
not know how to assemble regular expressions, but I wonder if there is
some interface we can concoct that could give them more capability
without forcing them to learn too much.

Owen

Reply all
Reply to author
Forward
0 new messages