Author Topic: exists  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

Offline MelkiyProd.

  • Occasional poster
  • *
  • Posts: 69
  • Languages: English, Русский, Українська.
    • View Profile
exists
« on: March 18, 2014, 05:01:10 PM »
Code: [Select]
{.if|{.postvar|name.}={.exists|template/users/{.postvar|name.}.}
why doesn't work? It's works like {.if|{.{.postvar|name.}={.postvar|name.}, but necessary to check folder path.

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1890
    • View Profile
Re: exists
« Reply #1 on: March 19, 2014, 07:55:09 PM »
{.if|{.postvar|name.}={.exists|template/users/{.postvar|name.}.}
the logic of "if" is incoherent, compare text to a boolean value can not function, the syntax is completely revise

you writesomething as:  IF (string=boolean) wihout then (and) else end

would not you rather that you are looking to get
to verify if is defined name and exists folder with same name?
{.if|{.and|{.postvar|name.}|{.exists|template/users/{.postvar|name.}.}|  true |  false /if.}

Follow members gave a thank to your post:


Offline MelkiyProd.

  • Occasional poster
  • *
  • Posts: 69
  • Languages: English, Русский, Українська.
    • View Profile
Re: exists
« Reply #2 on: March 20, 2014, 08:38:05 AM »
{.if|{.postvar|name.}={.exists|template/users/{.postvar|name.}.}
the logic of "if" is incoherent, compare text to a boolean value can not function, the syntax is completely revise

you writesomething as:  IF (string=boolean) wihout then (and) else end

would not you rather that you are looking to get
to verify if is defined name and exists folder with same name?
{.if|{.and|{.postvar|name.}|{.exists|template/users/{.postvar|name.}.}|  true |  false /if.}


Yes, thank you very much!!!  :) It works as I wanted  ;)