IOWA again

M

Mark Probert

Hi,

Another IOWA issue but more likely, a "me" issue.

I have a header than contains the code:

Logged in as: @user<br/>


I have a LeftNav panel that includes

def foo_page
'/foo' # mapfile.conf --> /foo: Run::Foo
end


'foo' includes the LeftNav and the header. However, I am not sure of how
to pass @user via the LeftNav. If I change LeftNav to:

def foo_page
newPage = page_named("Run::Foo")
newPage.user = @user
yield newPage
end


I get an error

<a href="
no block given
(eval):39:in `credit_page'


Any ideas on how to pass the @user to the LeftNav?

BTW, @user is correctly defined and available LeftNav.

Many thanks,
 
K

Kirk Haines

On Fri, 10 Sep 2004 06:55:04 +0900, Mark Probert wrote
I have a LeftNav panel that includes

def foo_page
'/foo' # mapfile.conf --> /foo: Run::Foo
end

'foo' includes the LeftNav and the header. However, I am not sure
of how to pass @user via the LeftNav. If I change LeftNav to:

def foo_page
newPage = page_named("Run::Foo")
newPage.user = @user
yield newPage
end

I get an error

<a href="
no block given
(eval):39:in `credit_page'

Any ideas on how to pass the @user to the LeftNav?

Yeah. You can see an example of this in the webrick demo. However, your
snippet of code up there is exactly what you want.

foo_page() should create the new page, assign @user to it, and then yield
it, exactly as you are doing.

The change you need to make is in your HTML:

Instead of this:

<a href="@foo_page">Goto foo</a>

you want this:

<a oid="foo_page">Goto Foo</a>



Make sense?


Kirk Haines
 
M

Mark Probert

Hi, Kirk.

Kirk Haines said:
<a oid="foo_page">Goto Foo</a>

Make sense?
Got it. Thanks.

BTW, you mentioned once before but I can't find the reference.
awake() is triggered on page initialisation. What is triggered
each time the page is referenced?
 
K

Kirk Haines

<a oid="foo_page">Goto Foo</a>

Make sense?
Got it. Thanks.

BTW, you mentioned once before but I can't find the reference.
awake() is triggered on page initialisation. What is triggered
each time the page is referenced?[/QUOTE]

That would be setup().


Thanks,


Kirk Haines
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top