Is it possible to use more than just the two conditions? I’d like to have a few ’or’ conditions before the else statement.
I’m fairly new to Revolution, having previously built a couple of sites in Evolution. I have a small site online which I copied on my localhost. Before importing the db I set up a number of snippets. Then decided IF would be helpful so tried to install it using the latest package (downloaded yesterday). I get the following:
Package found...now preparing to install.
Target directory is either not a directory or writable: /core/packages/
Could not transfer package if-1.1-pl.transport.zip to /core/packages/.
Could not install package with signature: if-1.1-pl
This is my second attempt - the first time the directory showed up as the online environment ie. hsphere/myname/mywebsite/core/packages/
I went looking in phpmyadmin and discovered that path in the workspaces table and editied to /core/packages/ - still no joy.
No other packages will install either. The question is: what is the correct Default MODx workspace on a localhost? - the path is c:/xampplite/modx/
I’m using Rev 2.0.4-pl2 on Xampp Lite 1.7.2, Apache 2.2.12 Mysql 5.1.37 all running on a Windows 7 64-bit machine
Thanks for any help.
Rob
-
MODX Staff
- 10,725 Posts
The path needs to be an absolute filesystem path, i.e. c:/xampplite/modx/core/packages/ -- and don’t forget the trailing slash.
I’m wondering if it is possible to nest IF statements? Am wanting to test for two TV’s, with the second conditional on the result of the first test.
The TV "Edition" has "Open" as one of three choices, TV "format" has two options standard or panorama. I would run this three times for each possible tv.Edition
The code I’ve tried is:
[[!If? &subject=`[[*tv.Edition]]` &operator=`EQ` &operand=`Open` &then=`[[!If? &subject=`[[*tv.format]]` &operator=`EQ` &operand=`panorama` &then=[[$OpenPano]] &else=`[[$OpenEd]]` ]]`]]
All I get is a blank.
If this is not possible with IF what snippet would do this?
Thanks
-
MODX Staff
- 10,725 Posts
What is tv.? Are you naming all of your TV’s with tv. at the beginning?