Loading ...
Sorry, an error occurred while loading the content.

2357Re: [Cheetahtemplate-discuss] Frustrated newbie!

Expand Messages
  • Terry MacDonald
    Nov 1, 2003
    • 0 Attachment
      Tavis, thanks for the reply.

      This is what I finally did:

      **** _SiteTemplate file *******

      from Cheetah.Templates.SkeletonPage import SkeletonPage

      class _SiteTemplate(SkeletonPage):

      def __init__(self, *args, **KWs):
      SkeletonPage.__init__(self, *args, **KWs)

      self._metaTags["HTTP-EQUIV"]['keywords'] = 'My keywords'
      self._stylesheetLibs = {'test.css':'test.css'}
      self._bodyTagAttribs = {'bgcolor':'black', 'text':'#000033'}

      ...etc
      This way I get to keep the functionality of the SkeletonPage's own
      methods. My SiteTemplate class then inherits or extends the above
      _SiteTemplate class instead of the SkeletonPage class. The _SiteTemplate
      class acts as a personal customisation layer. This is what OO is all
      about...isn't it?

      Do you think this is the right approach? if you think so, I think
      everything is actually falling into place for me and I am beginning to
      understand all this stuff!

      For example instance above I am setting values for the class instance
      which override the values initially used in the parent SkeletonPage
      class...yes?

      Many thanks,

      terry


      On Fri, 2003-10-31 at 17:47, Tavis Rudd wrote:
      > Hi Terry,
      > the stylesheet stuff in SkeletonPage is a bit wonky and very few people have
      > used it. I'd suggest that you just override the .stylesheetTags() method by
      > including something like this in your subclassed templates:
      >
      > #extends Cheetah.Templates.SkeletonPage
      > #def stylesheetTags
      > <style ...>
      > ...
      > </style>
      > #end def
      >
      > sorry for the delayed response,
      > Tavis
      >
      > On Wednesday 29 October 2003 17:47, Terry MacDonald wrote:
      > > Hi all,
      > >
      > > I'll quickly get down to it...can anyone offer any advice, preferably
      > > examples, of how to change/override the Skeleton Page stylesheet tags in
      > > the example siteTemplate.tmpl.
      > >
      > > Basically what do I enter in my siteTemplate.tmpl file to get the
      > > inherited Skeleton Page's $stylesheetTags to output my stylesheet file
      > > HTML style.
      > >
      > > If I crack this then I may begin to understand how to work these darn
      > > templates!
      > >
      > > As you can see I am still at the beginning.
      > >
      > > Cheers in advance
      > >
      > > Terry
      > >
      > >
      > >
      > >
      > > -------------------------------------------------------
      > > This SF.net email is sponsored by: SF.net Giveback Program.
      > > Does SourceForge.net help you be more productive? Does it
      > > help you create better code? SHARE THE LOVE, and help us help
      > > YOU! Click Here: http://sourceforge.net/donate/
      > > _______________________________________________
      > > Cheetahtemplate-discuss mailing list
      > > Cheetahtemplate-discuss@...
      > > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      >
      >
      >
      > -------------------------------------------------------
      > This SF.net email is sponsored by: SF.net Giveback Program.
      > Does SourceForge.net help you be more productive? Does it
      > help you create better code? SHARE THE LOVE, and help us help
      > YOU! Click Here: http://sourceforge.net/donate/
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      > ---
      > [This E-mail was scanned for viruses for your protection]
      --
      Terry MacDonald
      Founder/Director
      i3 Technologies



      -------------------------------------------------------
      This SF.net email is sponsored by: SF.net Giveback Program.
      Does SourceForge.net help you be more productive? Does it
      help you create better code? SHARE THE LOVE, and help us help
      YOU! Click Here: http://sourceforge.net/donate/
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Show all 3 messages in this topic