[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] If file exists... show it
mikeh@minivend.com writes:
<< I am still seeing this one here all of the time, as well as one or two
other things in the FAQ section. Anyone have a method for getting the
word out? A new title for the FAQ question? Requiring people to sign a
statement before downloading? 8-)
Mike,
I am sorry. I did not even think to check the FAQ. Shame on me. Thanks for
the reproof, much-needed as it was. Dare I ask, please indulge me once more.
I can see that for using the tag I'm using [value mv_searchspec] inside the
[if-file] tag, there needs to be some "quoting". What I tried originally is:
[if file /opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/[value
mv_searchspec].gif]
Doesn't work. Neither does quoting the [value mv_searchspec] tag:
[if file
/opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/"[value
mv_searchspec]".gif]
or single quotes:
[if file
/opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/'[value
mv_searchspec]'.gif]
So I tried quoting the whole path(no success):
[if file
"/opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/[value
mv_searchspec].gif"] *or*
[if file
'/opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/[value
mv_searchspec].gif']
The FAQ inspired me to try an 'href' property:
Nothing that I have tried so far works. Although, I took out the value tag
and inserted the name of an existing file, and it worked then (naturally).
So, please forgive me, I know the answer to this question is probably very
obvious, but I can't seem to find it. How can I use the search string
(mv_searchspec) as a portion of a file (absolute) path in the [if file][/if]
tags?
Thank you <strong>very</strong> much,
Rob Maurer
...
[if file
href="/opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/artifacts.
gif"]
[if file
"/opt2/home3/titanicmemorabilia/public_html/titanic/images/sys/artifacts.gif"]
=head1 Things about MiniVend that people sometimes don't understand....
There are a few things that seem to escape some users
in the documentation. This is no doubt due to the author's
closeness and familiarity with the concepts of MiniVend.
This section attempts to explain some of these basic issues.
[snip]
=head2 How can I tell when I need to quote a tag inside a tag?
In general, you don't need to quote the following tags
which are interpreted first within a list:
[item-code] [item-data ...] [item-field ...] etc.
[loop-code] [loop-data ...] [loop-field ...] etc.
[sql-code] [sql-data ...] [sql-field ...] etc.
This is because they are interpreted as a part of the
surrounding C<[loop]>, C<[item-list]>, C<[search-list]>,
C<[sql list]>, or C<[tag each table]> constructs.
So this will work:
[item-list]
[page [item-field url]]detailed info[/page] on [item-description]
[/item-list]
This will I<not> work:
[page [value mypage]]
The [value ...] tag is not interpolated before page, and the parser will
not know to do so. It needs to be instead:
[page href="[value mypage]"]
Clear as mud, right? Well, at least if you quote them all you can't go
wrong. 8-)
>>