Yes, a simple answer.  Use the <(functon args)> syntax. It is processed
after the conditional markup.

Read this page:  http://www.boltwire.com/index.php?p=docs.handbook.functions

Cheers,
Dan

On Thu Dec 18 2014 at 1:15:14 AM Tiffany Grenier <[email protected]>
wrote:

> Hi!
>
> I am still in a wonderful journey searching for the lack of performance of
> my website, and while benchmarking and debugging it today, I just noticed
> that conditionals ([if] statements) are processed AFTER commands...
> Which means, that the totality of the following piece of codepage will be
> processed (but not displayed) every time and for every one, which is
> obviously not desired, since my pages with {:cat} "date" are the heaviest
> ones, always leafs of the pagetree and are often included in other ones.
> This is the content of my jeu.header file:
> [if ! equal {p1} action][if ! set {action} || equal {action} print]
> [if ! equal {p1} 'main'][[main|+]] >[if] [(breadcrumb name=link)]
>
> ! {title}
> [if][if]
> [if ! equal {:cat} "date"]/*noting else than breadcrumb and title are
> needed on top of the content for date pages, but for almost all other ones
> - except zone pages (with cat zone, not the regular boltwire zones) where
> we only want a form for creating new subpages -, we want some more
> information about the page*/
> [if ! equal {p} "jeu" && editor][form][radio cat 'aucun'
> checked={:cat}]Lieu normal  [radio cat 'zone' checked={:cat}]Groupe de
> lieux (pays, région, ...)  [radio cat 'logement' checked={:cat}]Habitation
> [radio cat 'bureau' checked={:cat}]Lieu de travail  [radio cat
> 'bureau,logement' checked={:cat}]Habitation et lieu de travail  [submit
> value=CHANGE][command savedata cat][form][if]
> [if ! equal {:cat} 'zone']
> [if inlist list={:cat} item='logement']Domicile de : [(search
> group=character.* if='equal {+:home} {p}' template=charlist count=false
> type=-{zones})][if]
> [if inlist list={:cat} item='bureau']Bureau de : [(search
> group=character.* if='equal {+:workplace} {p}' template=charlist
> count=false type=-{zones})][if]
> [if]
> Dans ce lieu: [(toggle init=show id=subpages)]
> <div id="subpages" name="subpages">[if equal {page} "poudlard" || equal
> {page} "beauxbatons" || equal {page} "durmstrang" || equal {page}
> "vklodlak"]->[(search group={p}.* if='instring {+p} "classe" && ! equal
> {+:cat} "date"' template=subpageslistclas count=false type=-{zones})]<-[if]
> [if equal {p} "jeu" || inlist {:cat} 'zone']->[(search group={p}.*
> if='inlist {+:cat} "logement" && ! equal {+:cat} "date"'
> template=subpageslistlog count=false type=-{zones})]<-
> ->[(search group={p}.* if='inlist {+:cat} "bureau" && ! equal {+:cat}
> "date"' template=subpageslistbur count=false type=-{zones})]<-[if]
> [if equal {p} "jeu"]->[(search group={p}.* if='! equal {+:cat} "date"'
> template=subpageslist count=false type=-{zones})]<-
> [else]->[(search group={p}.+,{p}.+.+,{p}.+.+.+ if='! equal {+:cat} "date"'
> template=subpageslist count=false type=-{zones})]<-[if]
> /*[[#subpageslist]]
> [(template none)]pas de sous-lieux
> [(template first)][if less 0 {+matches}]Tous :[if]
> [(template each)]<(breadcrumb {+p} name=link offset={p0} separator=' >> ')>
> [[#endtous]]
> [[#subpageslistlog]]
> [(template first)][if less 0 {+matches}]Domiciles :[if]
> [(template each)]<(breadcrumb "{+p}" name=link offset={p0} separator=' >>
> ')>
> [[#endlog]]
> [[#subpageslistbur]]
> [(template first)][if less 0 {+matches}]Lieux de travail :[if]
> [(template each)]<(breadcrumb "{+p}" name=link offset={p0} separator=' >>
> ')>
> [[#endbur]]
> [[#subpageslistclas]]
> [(template first)][if less 0 {+matches}]Salles de classes :[if]
> [(template each)]<(breadcrumb "{+p}" name=link offset={p0} separator=' >>
> ')>
> [[#endclas]]
> [[#charlist]]
> [(template none)]personne
> [(template each)]*  [[{+p}|+]]
> [[#endcharlist]]*/
> [if login][[#souslieu]]**Créer un sous-lieu**[form]
> [t]
> [r][c]Nom du lieu :[c][text title]
> [r][c]ID du lieu :[c][text pageid]
> [r][c]Type du lieu :[c][select cat default=aucun required=true]
> [option 'zone' "Groupe de lieux (pays,région,...)"]
> [option 'aucun' "Lieu normal"]
> [option 'logement' "Domicile"]
> [option 'bureau' "Lieu de travail"]
> [option 'bureau,logement' "Habitation et lieu de travail"]
> [select]
> /*[r][c]Image :[c][file picture required=true]*/
> [r][c]Description du lieu :[c][box description cols=40 rows=5][box]
> [r][c][submit value=SAVE]
> [t]
> [command nextpage {p}.{=pageid}]
> [command create page={=nextpage}]
> [command savedata title,cat page={=nextpage}]
> [command edit {=description} page={=nextpage}]
> [form][if]
> </div>[if]
>
> I except it to take some time and/or be heavy on memory for pages that
> include big date pages, but not for the same date pages that are included.
> I am thus advising my member to directly access date pages when they are
> big, but the header processes breadcrumb twice and calls search many times
> anywa on these pages, making them no faster to load despite my intent...
> Any idea on how I can avoid such a behaviour?
>
> Cheers,
> Tiffany
>
> --
> You received this message because you are subscribed to the Google Groups
> "BoltWire" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/boltwire.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to