Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to move hard coded URL in tt files to a Catalyst module file

by Erez (Priest)
on Nov 01, 2016 at 10:32 UTC ( #1175052=note: print w/replies, xml ) Need Help??


in reply to How to move hard coded URL in tt files to a Catalyst module file

move the hard coded URL in tt file to POST a form

If you want to move any element from the template to the module, it's quite a simple matter of assigning it to a stash variable:

$c->stash('action' => 'http://example.org/cgi-bin/download.pl');
Then you can call it from the template:
<form action="[% action %]" method="POST">

However, for a better answer to your case, I suggest showing the template code as well, and maybe some more information about the task in hand.

Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert

Replies are listed 'Best First'.
Re^2: How to move hard coded URL in tt files to a Catalyst module file
by alwynpan (Acolyte) on Nov 07, 2016 at 07:46 UTC
    Erez, your solution actually worked. It was my bad, there was a typo in the code. Thank you so much.
Re^2: How to move hard coded URL in tt files to a Catalyst module file
by alwynpan (Acolyte) on Nov 07, 2016 at 06:07 UTC
    Hi Erez, Thank you for your help. However, it didn't work for me some how. Here is the code for the tt file. Your solution actually worked. It was my bad, there was a typo in the code. Thank you so much. Regards, Alwyn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1175052]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2019-11-17 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (85 votes). Check out past polls.

    Notices?