def SearchRules(objHere, strSearchText): objRules = GetWebsiteRoot(objHere, 'E3').Rules lstResult = [] for (strId, varValue) in objRules.propertyItems(): strTitle = "" if not strId in ['title', 'MaySearch']: if strSearchText in varValue.lower(): if strId == 'MainPage': strLink = '/Rules' strTitle = "List Rules" else: strLink = '/Rules?Id=%s' % strId objHelp = SearchOne(objHere, 'E3Help', 'HelpId', strId) if objHelp: strTitle = objHelp.title if strTitle: lstResult.append((strTitle, """<li><a href="%s">%s</a></li>\n""" % (strLink, strTitle))) return PresentWebTree(lstResult)
def StoreRules(objHere, strId, strHTML): objRules = GetWebsiteRoot(objHere, "E3").Rules try: objRules.manage_addProperty(strId, strHTML, "string") except: objRules.manage_changeProperties({strId: strHTML})