Opened 16 years ago

Closed 9 years ago

#310 closed enhancement (fixed)

Set template name in omega.config

Reported by: marco Owned by: Olly Betts
Priority: normal Milestone: 1.3.4
Component: Omega Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

I thought it would be nice if the used template file could be defined in the omega.config file. With this option you can simply change the used templates without changing it in the source. And also you can use different templates e.g. at a server which hosts multiple websites in different directories.

Attachments (1)

template_name_in_omega_config.diff (1.5 KB ) - added by marco 16 years ago.
Patch for setting template name in omega.config

Download all attachments as: .zip

Change History (3)

by marco, 16 years ago

Patch for setting template name in omega.config

comment:1 by Olly Betts, 16 years ago

Operating System: LinuxAll

Thanks for your patch.

Note that you can just specify the template name by setting the FMT CGI variable in your HTML search form with:

<input type="hidden" name="FMT" value="...">

That will appear in the URL (if your form uses method=GET), and the user can override it in their web browser, but the same is true with your patch as it currently stands.

This patch would need to update the documentation to mention this new configuration option.

And what happens is fmt_name isn't set (as it won't be in any existing omega.conf)? I think the default of "query" would need to stay in this case to not break existing installations...

comment:2 by Olly Betts, 9 years ago

Milestone: 1.3.4
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.