Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Includes and logic
TeamSite_Smasher
Ill try to explain this the best i can so bare with me.
i have a form generated page called "alerts.asp" which is generated by .cfg and .tpl files.
the visual editor has 2 fields to populate: Title, Message
in the .cfg file:
[html]
Provider Alert Title
Alert Title is the title that shows up at the top alert box.
Provider Alert Content:
Enter content to display in alert box
<br> maxlength="40000" external-editor="visualformat" external-editor-inline="true" /><br> </item>[/html]<br><br>in the .tpl file i have this very simple for explanation purposes:<br><br>[html]<h3> {iw_value name="dcr.alerts-include.prov-alerts-title"/}</h3><br><br><p> {iw_value name="dcr.alerts-include.prov-alerts-message"/}</p>[/html]<br><br>OK....SO...what i want to do is this.<br><br>I have on all of my pages, "footer.asp" via include.<br><br>[html]<!--#include virtual="/_includes/home_footer.asp"-->[/html]<br><br>Is there a way, using logic in the footer to say (essentially):<br><br>[html]if {iw_value name="dcr.alerts-include.prov-alerts-title"/} & {iw_value name="dcr.alerts-include.prov-alerts-message"/} == true<br><br>document.write = "<a href="alerts.asp">New Message!</a><br><br>esle if <br><br>document.write = ""<br>[/html]<br><br>can i have home_footer.asp read those fields to see if they have content, and if so show the link, if not, show nothing.<br><br>make sense?<br>make sense?
Find more posts tagged with
Comments
Migrateduser
Couldn't you create a VB variable that you set to true or false depending on your condition?
Then in the home_footer.asp read that variable and determine if you should create your href.
BC_BIEU_B02_DN_QD15_L.rptdesign
alanhill
Hi, if I understand correclty you are wanting to put some logic into the include file which checks for a DCR value. That can't be done because when the asp include file is "run" (pre-processing as part of the htp request for the page), the file is no longer controlled by the TS generation process.
One way round it potentially could be to write these two values into vbscript/asp variables in the parent page. So the template could write something like:
Dim sTitle, sContent
Title = "Hello"
Content = "World"
Your include file could then check for the content of those variables, and response.write yuor link accordingly.
We use the same thing to determine elements of our page - we let the tpl write some variable definitions, and then check those in some standard include files, and do something different, depending on the values.
Cheers
Alan