Any servlet that is based on SidebarPage will have the Sidebar methods.  You can 
override the entire method 

(SitePage is based on SidebarPage)

from SitePage import SitePage
class SecurePage(SitePage):
 '''
 This is the baseclass for all the pages on the site that require you be be avalid 
user.
 it inherits from SitePage
 '''
 def __init__(self):
     SitePage.__init__(self)

 def writeSidebar(self):
  self.startMenu()
  self.menuItem('Log out','Logout')

if I want the sidebae from SitePage also I can add
    SitePage.writeSidebar(self)
etc....

If you just want a minor to chage then define a SitePage based on SideBar something 
like so:

from BasePage import BasePage

class SitePage(BasePage):
  def __init__(self):
        self.MenuColor="#FF00FF"

 def writeSidebar(self):
    self.writeln('<font color="%s">' % self.MenuColor)

In the pages where you want the color to change redefine self.MenuColor (You do not 
need to redefine the writeSidebar method here.

from SitePage import SitePage

class NewPage(SitePage):
  def __init__(self):
        self.MenuColor="#C0C0C0"




----- Original Message ----- 
From: "Aleksandar Kacanski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:30 PM
Subject: [Webware-discuss] rewrite sidebar from servlet


> Hello All,
> how do I go about  changing  a SidebarSections
> within the servlet. Example would be changing a
> link or color in specific link under
> SidebarSections.
> I am fine if the call is originating from the
> ExamplePage or SidebarPage, but I am unable to
> overwrite method within servlet like Welcome.
> In essence I want to overwrite a link color on
> the WebwareEmailMenu when I click on it without 
> defaulting to HTML body args.
> 
> Thanks
> /s
> 
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
> 
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to