Forum OpenACS Q&A: Re: Using an .adp template with a .vuh page

Collapse
Posted by Richard Hamilton on
I thought it would be a good idea to serve up the root index page of a site through Edit-this-page to enable users/admin to update content and I wanted to retain the "You are currently logged in as.." functionality that is included in the OpenACS index page following a new install.

I can see that Stephen's solution will work for returning a .tcl/.adp page pair from the file system, but has anyone yet worked out how to include the contents of tcl vars in a page served from Edit-this-page - (or am I just getting too ambitious here!?).

Regards
Richard

Collapse
Posted by Tilmann Singer on
The thread above is quite old - the correct answer to it today would be to use

rp_form_put x $x
rp_internal_redirect my-template

Where my-template could refer to a single file my-template.adp, which would display the content of the variable x if it contains @x@.

I am not quite sure what you are asking though ..

Collapse
Posted by Richard Hamilton on
Thanks for clarifying the use of rp_form_put. What I am asking is whether/how I can include @var@ type references in pages served by the Edit-This-Page module.

i.e. ETP root mounted on /content and index.vuh in web root at / so that when http://www.bloggs.com is requested the request processor serves /content/index via the ETP application. So the page is an ETP served page from the database wrapped in defaultmaster.adp. My question is then how to I include variables from a .tcl script in the part of the page that was served by the ETP app?

Regards
Richard