You are hereSupport Forums
Search:  
Logic token not working as I expect
Last Post 11 Jun 2010 07:47 AM byRichard Edwards. 5 Replies.
AddThis - Bookmarking and Sharing ButtonPrinter Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
AuthorMessages
eoghano
New Member
New Member
Posts:12

--
10 Jun 2010 05:10 AM  
The Logic tokens do not seem to be working for me as I expected. For example if I put the following into a template, the text between the Logic Tokens is rendered even when the FBURL has a value. [IFFBURL VALUE=""]This text is rendered even when the Facebook URL field has a value: [FBURL][/IFFBURL] Is there something amiss with my syntax? As far as I can see it follows the syntax described on the logic token wiki: http://wiki.dnnstuff.com/Tokens_Logic.ashx
Richard Edwards
DNNStuff Founder
Advanced Member
Advanced Member
Posts:902
Avatar

--
10 Jun 2010 09:29 AM  
Hi Eoghan,

The token [IFFBURL VALUE=""][FBURL][/IFFBURL] should only render the [FBURL] token if the value of that field is an empty string. I'm assuming you want to render it only if there is something in the FBurl field?

Try doing this:
[IFNOTFBURL VALUE=""][FBURL][/IFNOTFBURL]

That will render the [FBURL] field, if the field is not an empty string.



Richard Edwards
DNNStuff Founder
eoghano
New Member
New Member
Posts:12

--
10 Jun 2010 10:02 AM  
I tried that already but if it is not an empty string the [IFNOTFBURL...] token is - for me at least - not rendering the FBURL field. In fact to get the URL appearing on the page I have had to resort to: [IFFBURL VALUE=""][FBURL][/IFFBURL] Basically the [IF...] and [IFNOT...] tokens both do the opposite thing to what I expect. Any ideas?
Richard Edwards
DNNStuff Founder
Advanced Member
Advanced Member
Posts:902
Avatar

--
10 Jun 2010 10:56 AM  
Ok, I just did a quick test and can see a problem with the parsing code. I'll have to run some more tests with the logic replacement to see what's going on. Stay tuned.


Richard Edwards
DNNStuff Founder
eoghano
New Member
New Member
Posts:12

--
10 Jun 2010 11:06 AM  
Great Richard. I remain tuned in...
Richard Edwards
DNNStuff Founder
Advanced Member
Advanced Member
Posts:902
Avatar

--
11 Jun 2010 07:47 AM  
Just wanted to update this thread. I sent Eoghan a new build of the dnnstuff utilities assembly and it's working as it's supposed to now. The fix will come out in the next SQLView Pro release in a couple weeks.


Richard Edwards
DNNStuff Founder
You are not authorized to post a reply.

Active Forums 4.1
Privacy StatementTerms Of UseCopyright (c) 2004-2010 DNNStuff