Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...using IF, THEN / BOOLEAN statements in Dotnetnuke with tokensusing IF, THEN / BOOLEAN statements in Dotnetnuke with tokens
Previous
 
Next
New Post
4/26/2009 1:13 PM
 

Is there a module or a way to use boolean logic in dotnetnuke?

For example, I bulk installed users and didn't have e-mail addresses for everyone.  It seems some people just don't get how to update their e-mail address or they think they already have updated it.

I'd like to be able to say something simple like

If [User: Email]="" then textbox1.visible="true"

Text1box1.text="We do not have an e-mail address on record for your account. Please click here to update your profile"

 

I know that's not great code above.. but is there a way to use code in such a manner? like with HTML module?

 
New Post
4/26/2009 2:58 PM
 

I sort of figured it out using XML module. Something I never used before.

http://www.dotnetnuke.com/Development/Forge/ModuleXML/Examples/Walkthrough/tabid/1038/Default.aspx  has some good example.

______

My welcome.xml just has "<xml/>" in it, nothing more.

______

My welcom.xsl is as follows:

<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="displayname"/>
<xsl:param name="email"/>
<xsl:param name="phone"/>

  <xsl:template match="xml">
    Welcome <xsl:value-of select="$displayname"/>. 
<xsl:choose>
  <xsl:when test="$email=''">
    You do not have an e-mail address on file. You may be missing important e-mail updates. Please <A HREF="UpdateProfile.aspx">click here</A> to add your e-mail address. 
  </xsl:when>
  <xsl:otherwise>
   Your registered e-mail address is <xsl:value-of select="$email"/>. 
  </xsl:otherwise>
</xsl:choose>  Your phone number in the directory is <xsl:value-of select="$phone"/>. <A HREF="UpdateProfile.aspx">Click here</A> to update your contact information.
   </xsl:template>
</xsl:stylesheet>

_______

My XSL parameters are:

displayname

email

phone

all pretty self explanatory.

Keep indexing off.

 
New Post
4/26/2009 7:18 PM
 

Token replace is included in system messages and text/HTML module (if enabled in module settings).

it is NOT a language and does not support IF .. THEN .. ELSE, but it supports some formatting, which is helpful, follwing this syntax:

[object:property|format|value_if_null], e.g.

[User:DisplayName|Hi {0}|Dear Guest]

HTH


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/26/2009 8:16 PM
 

boolean logic? Isn't it businesslogic you are asking for?

/Johan Pensionsrådgivarna

 
New Post
4/28/2009 7:54 PM
 

Yes, I suppose I did have the terminology wrong. Sorry about that.
Regardless, I think it is possible to use if/then statements with XML.

For example, if you had a custom profile field like Birthday....

you could probably use XML to figure out a way to say "Happy Birthday!" on someone's birthday...

if birthday=today, display Happy Birthday, etc.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...using IF, THEN / BOOLEAN statements in Dotnetnuke with tokensusing IF, THEN / BOOLEAN statements in Dotnetnuke with tokens


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out