[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] "INCLUDE" using a scratch variable to call text file
On 8 Dec, KEVIN LYONS wrote:
> Hopefully this will be simple, my question is I can successfully insert a text page into my html by explicitly typing that name. EXAMPLE: [include pages/test.txt] WORKS GREAT. What I want to do is use a scratch variable instead of explicitly typing the location of the text file
>
> EXAMPLE of what I want to do but does not seem to work…
>
> [set text_file]pages/test.txt[/set]
>
> [include [scratch text_file]]
>
> results are that the text file is not displayed only the closing ‘]’ shows up, so I have tried many different ways to get the vairable in but no luck!
>
> CAN THIS BE DONE, IF SO HOW?
>
> THANKS FOR THE HELP.
>
> Running Minivend 3.4-3 lunix
>
> Most everything else is stable and working fine.
>
> Kevin Lyons
> kclyons@silvernet.net
Maybe this can solve...
[set scratch textfile]pages/test.txt[/set]
[include [scratch textfile]]
or
[set name="textfile" interpolate=1]pages/test.txt[/set]
[include [value textfile]]
or
[perl arg=scratch]
$Safe{'scratch'}->{'txtfile'} = 'pages/test.txt;
return '';
[/perl]
Check the variable and put this code into your page
Test the value of .... : [scratch textfile] or [value textfile]
to see what you get.
Regards,
Joachim
--
Hans-Joachim Leidinger
buch online jojo@buchonline.net
Munscheidstr. 14 FAX: +49 209 1971449
45886 Gelsenkirchen FAX: 0209 1671449