switch between template sets

Niels Dettenbach <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Organization Syndicat IT&Internet
Message-ID <[email protected]>
Dear ZMS user and devels,


today i've tried to use a ZMS instance with different template sets - choosen 
by URL. 

I want to use a different template for mobile devices (not just CSS handheld 
based).

This won't work for me - if anyone has a better idea how i can provide 
different sets of ZMS templates for a ZMS site pls let me know this.

My idea was to put the different parts of the main template into a sub folder 
and use the aquisition mech of Zope - like:

my instance:	/zms1/
content path:	/zms1/content/

the "standard" template methods are located under
			/zms/
as usual.

I created a subfolder /mobile/
			/zms/mobile/

and copied (for first) the
	"standard_html***" methods into it.

(My target is to modify header and footer - if possible the float too - in 
this subdirectory to a optimized content flow for mobile users / devices)

1.)
If i try to call the url:
	http://example.tld/zms1/content/mobile/

i get a "Index out of range" in the content area of the page - but the teaser 
area (and other parts of the template layout) from the start page was shown.

2.)
If i try to call any sub page url - like:
	http://example.tld/zms1/content/mobile/e89/
the page would displayed - but without aquisition of my changes within
	/zms1/mobile/

3.)
If i try
	http://example.tld/zms1/content/e89/mobile/

i get the same error then under 1.) ("Index out of range").


here is the full zms-error:

--- snip ---
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module OFS.DTMLMethod, line 144, in __call__
   - <DTMLMethod at /zms1/index_html used for /zms1/mobile>
   - URL: http://example.tld/zms1/index_html/manage_main
   - Physical Path: /zms1/index_html
  Module DocumentTemplate.DT_String, line 476, in __call__
  Module DocumentTemplate.DT_Util, line 196, in eval
   - __traceback_info__: RESPONSE
  Module <string>, line 1, in <expression>
  Module AccessControl.ZopeGuards, line 67, in guarded_getitem
IndexError: list index out of range

--- snap ---

May be someone could point me to a solution?

however...

many thanks for your time in advance!
best regards,


Niels.
-- 

---

  Niels Dettenbach
  ---
  Syndicat IT&Internet
  http://www.syndicat.com
  T.-Muentzer.-Str. 2, 37308 Heilbad Heiligenstadt - DE
  ---
  Kryptoinfo: 
  PGP public key ID 651CA20D
  Fingerprint: 55E0 4DCD B04C 4A49 1586  88AE 54DC 4465 651C A20D
  https://syndicat.com/pub_key.asc
  ---
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.