Developer forum

Forum » Templates » If statements in Mastertemplate

If statements in Mastertemplate

Tue Beck
Reply
Im trying to edit the meta data in the mastertemplate via the DW if statement and the Server.Request.

Something like: <!--@If(Server:Request.groupid==Haand-->hopla<!--@EndIf-->

It works - BUT creates a huge amount of load and page slow down - the exe time goes from 0,4 to 45 sec. !!

I can’t use the normal meta field in eCom because of an old C5 productimport which overrides all productdata as it runs.

Does anyone have any idea how I can fix the load problem?

...or any ideas how I create productgroup metadata without using the metafields in eCom?

THX!

Replies

 
Nicolai Høeg Pedersen
Reply
You are missing a ) in your statement. Try fixing it and see if it helps...
 
Tue Beck
Reply

lol - indeed it did

 

...The funny thing is that it still works perfectly within the <body></body> without the )

 

Guess it must be Friday! - Thank a lot for the help!

 
Nicolai Høeg Pedersen
Reply
Hi Tue

It does not work - it just prints out "hopla" no matter what because the rest of the if statement is just a html comment being ignored by the browser.

 

You must be logged in to post in the forum