I have a function which generates sort of a business card:

def businesscard():
    if not len(request.args):
        redirect(URL('default','error'))
    else:
        id=request.args(0)
 
company=address=nfas=mouse=logo=tagline=cssfile=css=image=text=[]
 
company=db(db.bedrijf.id==id).select(db.bedrijf.id,db.bedrijf.bedrijfsnaam).first()
 
address=db((db.adres.bedrijf_id==id)&(db.adres.adressoort_id==1)).select(db.adres.ALL).first()
 
nfas=db((db.nfa.bedrijf_id==id)&(db.nfa.nfatype_id==db.nfatype.id))\
        
.select(db.nfa.nfatype_id,db.nfa.adres,db.nfatype.nfatype,orderby=db.nfa.nfatype_id)
 
functions=db(db.function.bedrijf_id==id).select(db.function.ALL).first()
        if functions.logo:
 
logo=db(db.logo.bedrijf_id==id).select(db.logo.link).first()
        if functions.tagline:
 
tagline=db(db.tagline.bedrijf_id==id).select(db.tagline.zin).first()
        if functions.image:
 
image=db((db.bedrijfimagelink.bedrijf_id==id)&(db.bedrijfimagelink.imagelink_id==db.imagelink.id))
\
            .select(db.imagelink.link).first()
        if functions.text:
 
text=db(db.hptext.bedrijf_id==id).select(db.hptext.tekst).first()
        if functions.css:
 
cssfile=db((db.bedrijfcss.bedrijf_id==id)&(db.bedrijfcss.css_id==db.css.id)).select(db.css.link).first()
        if functions.customcss:
 
css=db(db.customcss.bedrijf_id==id).select(db.customcss.ALL).first()
        return
dict(company=company,address=address,nfas=nfas,mouse=mouse,logo=logo,tagline=tagline,cssfile=cssfile,css=css,image=image,text=text)


The view of this function businesscard.html extends a layout.html
view. The problem I am facing is that I would like to extend the
business card's behaviour with a timetable.

I have no idea how to approach this, basically when the user first
visits the business card the text and image and all the rest should be
displayed, then, when the user clicks the timetable link the text and
image bit should be replaced with the timetable and all the rest
should remain the same.

What is the best way to proceed?


Kind regards,

Annet.

Reply via email to