Re: [WebDNA] Good advise on [Showif] or alternative...
This WebDNA talk-list message is from 2012
It keeps the original formatting.
numero = 108550
interpreted = N
texte = Turn your logic:[showif [query]=3D[raw][query][/raw]]Serve the default list[/showif]Best,Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se7 feb 2012 kl. 21:55 skrev Palle Bo Nielsen:> Hi Govinda,>=20> I will try to explain in an alternative way. But first thanks for your =input which I am trying to decipher :)>=20> Well, imaging having one physical file of WebDNA acting in different =ways depending on the actual URL which is loaded. Like ='http://www.macnyt.dk/forum/' loads a list of the most recent articles =in a forum and 'http://www.macnyt.dk/forum/?query=3D72837' loads a =specific thread and shows it. Note, that both results is from the same =WebDNA file and as such have the same URL - the only difference is that =the second URL has some variables attached.>=20> So now I would like to make some [showif] statements to help me =showing the user what he requested. If he requested ='http://www.macnyt.dk/forum/' then the first imageinary showif (below) =should work.>=20> ----> [showif [thisurl]=3D/forum/]> result a> [/showif]>=20>=20> [showif [thisurl]=3D/forum/?query=3D72837]]> result b> [/showif]> ---->=20> The problem is that if I do a '[showif =[thisurl]=3D/forum/?query=3D72837]]' then this is also parsing the ='[showif [thisurl]=3D/forum/]' since [thisurl] only contain the 'forum' =part and not the '?quert=3D72837' part.>=20> If I was to use the newer version of (thisurlplus..something] then it =would also pass.>=20> The challenge is that it is quite easy to catch a variable value like =the 'query=3D72837' but I have a hard time catching just an =initial/default page lige /forum/ with no attached variables.>=20> I hope I was a bit more clear - even though I feel a but confused and =tired my self.>=20> /Palle>=20>=20>=20> On 07/02/2012, at 21.33, Govinda wrote:>=20>>>=20>>>=20>>> Hi all,>>>=20>>> Seeking some good advise on what might just be a very simple case...>>>=20>>> If need to make a [showif] on a specific URL, which needs to be>>> 'http://www.macnyt.dk/forum/' nothing more nothing less.>>>=20>>> My experience is that if I make an '[showif>>> =[something]=3Dhttp://www.macnyt.dk/forum/?some=3Dadditional_variable&and=3D=another>>> ]' then is passes as well.>>>=20>>> In '[showif]' we have EQUAL, NOT EQUAL, CONTAINS, BEGINS WITH, LESS =THAN,>>> GREATER THAN, DIVISIBLE BY - but none of the seems to do the trick.>>>=20>>> Good ideas and inspiration is appreciated.>>=20>> Hi Palle>>=20>> I am confused what is actually proving difficult for you. Could you =explain the issue again, in different words?>>=20>> Or, if I do understand.. then could you try this:>>=20>> (the opening [showif] tag is all on one line:)>>=20>> [showif [URL][thisurl][formVariables][if =("[index]"=3D"1")][then]?[/then][else]&[/else][/if][name]=3D[url][value][/=url][/formvariables][/URL]=3D[URL]http://www.macnyt.dk/forum/[/URL]]>> =09>> [/showif]>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list
.>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
Turn your logic:[showif [query]=3D[raw][query][/raw]]Serve the default list[/showif]Best,Christer ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se7 feb 2012 kl. 21:55 skrev Palle Bo Nielsen:> Hi Govinda,>=20> I will try to explain in an alternative way. But first thanks for your =input which I am trying to decipher :)>=20> Well, imaging having one physical file of WebDNA acting in different =ways depending on the actual URL which is loaded. Like ='http://www.macnyt.dk/forum/' loads a list of the most recent articles =in a forum and 'http://www.macnyt.dk/forum/?query=3D72837' loads a =specific thread and shows it. Note, that both results is from the same =WebDNA file and as such have the same URL - the only difference is that =the second URL has some variables attached.>=20> So now I would like to make some [showif] statements to help me =showing the user what he requested. If he requested ='http://www.macnyt.dk/forum/' then the first imageinary showif (below) =should work.>=20> ----> [showif [thisurl]=3D/forum/]> result a> [/showif]>=20>=20> [showif [thisurl]=3D/forum/?query=3D72837]]> result b> [/showif]> ---->=20> The problem is that if I do a '[showif =[thisurl]=3D/forum/?query=3D72837]]' then this is also parsing the ='[showif [thisurl]=3D/forum/]' since [thisurl] only contain the 'forum' =part and not the '?quert=3D72837' part.>=20> If I was to use the newer version of (thisurlplus..something] then it =would also pass.>=20> The challenge is that it is quite easy to catch a variable value like =the 'query=3D72837' but I have a hard time catching just an =initial/default page lige /forum/ with no attached variables.>=20> I hope I was a bit more clear - even though I feel a but confused and =tired my self.>=20> /Palle>=20>=20>=20> On 07/02/2012, at 21.33, Govinda wrote:>=20>>>=20>>>=20>>> Hi all,>>>=20>>> Seeking some good advise on what might just be a very simple case...>>>=20>>> If need to make a [showif] on a specific URL, which needs to be>>> 'http://www.macnyt.dk/forum/' nothing more nothing less.>>>=20>>> My experience is that if I make an '[showif>>> =[something]=3Dhttp://www.macnyt.dk/forum/?some=3Dadditional_variable&and=3D=another>>> ]' then is passes as well.>>>=20>>> In '[showif]' we have EQUAL, NOT EQUAL, CONTAINS, BEGINS WITH, LESS =THAN,>>> GREATER THAN, DIVISIBLE BY - but none of the seems to do the trick.>>>=20>>> Good ideas and inspiration is appreciated.>>=20>> Hi Palle>>=20>> I am confused what is actually proving difficult for you. Could you =explain the issue again, in different words?>>=20>> Or, if I do understand.. then could you try this:>>=20>> (the opening [showif] tag is all on one line:)>>=20>> [showif [url][thisurl][formvariables][if =("[index]"=3D"1")][then]?[/then][else]&[/else][/if][name]=3D[url][value][/=url][/formvariables][/URL]=3D[url]http://www.macnyt.dk/forum/[/URL]]>> =09>> [/showif]>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Christer Olsson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
SMSI (Scott) clues?? (2005)
Windows 95/NT tip of the month (1998)
Price Not Appearing (2000)
WebCat2b12 - nesting [tags] (1997)
refreshing IE with posted .tmpl (1997)
EIMS Problems (1997)
Listserver problem (1997)
[WebDNA] TCPDoh (2009)
WebCatalog can't find database (1997)
Re:Virtual hosting and webcatNT (1997)
X etc.... (1999)
all records returned. (1997)
Bug Report, maybe (1997)
problems with 2 tags (1997)
group searching problem (2002)
[WebDNA] reverse rank=off (2008)
Re:webCatalog and Stocks (1998)
[PHP3] php vs WebCatalog (2000)
Stumpted Again (1997)
Generating Report Totals (1997)