close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


conditional vars in framework

Thread began 3/27/2012 1:47 pm by Steve | Last modified 3/27/2012 2:11 pm by Steve | 628 views | 2 replies |


conditional vars in framework


I have a site that uses the framework for templating.

Within the primary dw template I want to add a condition where IF a variable is present (isset) then echo the value.

Basically it is code that will only fire when a page has a particular recordset (rs_invType) and value (typeName).

Problem: Value is not found when placed in the template.


<?php if (isset($row_rs_invType['typeName'])) { ?>

  <div class="redBorder" style="width:240px; height: 30px; margin-left:300px; margin-top:40px;">
here : <?php echo $row_rs_invType['typeName']; ?>
  <!-- inventory title -->
  else { 
  <!-- not found -->
  <?php ?>

While this code works perfectly in the page that actually creates the recordset it fails when set to the template.

Is the problem that the template is server side processed fully before the page where the template is applied?

Do they not have all the pre HTML server side code processed before moving to the conditional statements in either document?

Sign in to reply to this post

Jason ByrnesWebAssist

you will need to add the rs_invType recordset to the template.

Sign in to reply to this post


Thanks for the reply Jason.

I was hoping to streamline by sharing a recordset. And only show a value when this recordset was present as other pages that share this template will not have the value available to display.

Not a problem, I'll have to add a recordset that only gets called IF the page has a specific value such as the ID from a $_GET...

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...