Forum OpenACS Q&A: Re: OACS Homepage Template/ETP Implementation

Collapse
Posted by Eric Wolfram on
Thanks for the clarification. IT's not obvious...I'm stuck on something still. I've gone over all this many times and set up almost an identical system. However, mine is not yet behaving as I would expect.

I got the edit this page to appear on the / front page by putting some code into the default-master.adp and .tcl. ETP is using a templates/homepage as the application but the @pa.content@ is not showing up -- it's blank. So I click on "edit this page". Here's where I would expect to see the edit admin page...but what I really see is the homepage template WITH the @pa.content@. There is another "edit this page" link at the bottom of that page (the context menue says myhome > ETP) and when I click on that link I DO get to the edit admin page and I can edit @pa.content@ there.

So for / it's not working right. I noticed in index.vuh the following "trickery" but I don't understand it -- is the solution to my issue here?

from package/edit-this-page/www/index.vuh

if {[empty_string_p $name] || $name == "index"} {
    set path "/[etp::get_application_param index_template]"
} elseif {[string match "etp*" $name]} {
    # this "trickery" is for serving pages from the top level,
    # where the acs-subsite package is mounted rather than
    # the editthispage package.  normally the request processor
    # finds these before invoking this file.
    set path "/packages/edit-this-page/www/$name"
} else {

    set path "/[etp::get_application_param content_template]"

    # set up form variables so we can pass the "name"
    # variable to the content page.
    global _ns_form
    set _ns_form [ns_set create]
    ns_set put [ns_getform] "name" $name