Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If/else Optional Regions in Macromedia Templates???

Status
Not open for further replies.

jawbonium

Technical User
Nov 5, 2003
9
US
I am using Dreamweaver MX 2004. I have started a template for the site. I would like to create a series of "Optional Region"s which are more than strictly boolean. Rather I would like them to be dependant upon the name of the page, displaying X1 if the page name is X and displaying Y1 if the page name is Y.

The supporting documentation suggests that if/else statements are possible for Optional Regions, but there are no examples and I am having no luck figuring it out on my own. Does anyone have any thoughts?

Thank you in advance for you help!
 
assuming that "page name" is stored in DB then it is reather easy based on if statements:
Code:
<% 
IF 
RS.Fields.Item("SectionName").Value = "Tutorials" 

THEN
Response.Write("here are pages from section Tutorials:<br>")

  while NOT RS.EOF---repeat region thing

  <%= RS.Fields.Item("PageName").Value %><br>

   wend--------------------------------


ELSE
  Response.Write(" there is no section called Tutorials,therefor no pages associated with it")

END IF
%>

You may want to insert "Recordset navigation" and see how MM uses their "show if" statements!
HTH
All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top