pulling text from a page node "bodyText" and calling it into flash animation on another page Options
Sharon
Posted: Thursday, June 05, 2008 7:59:18 PM
Rank: Enthusiast

Joined: 5/20/2008
Posts: 39
Location: Indiana, U.S.A.
I have a animated intro to news story box on my home page. I also have the "full story" on a page called news.aspx
created in umbraco.

I want the flash file to automatically update when a user edits and publishes a new story on the news.aspx page (by pulling the text out of the bodyText node off of the news page) .

I don't know the syntax on how umbraco keeps the info. I know it calls it for the news page. I just want that same snippet of text and picture for my flash file.

I am using getURL function in actionscript 2 but don't know how to phrase the request.
It is the text in the bodyText node on the new.aspx page. Can this be done this way?

Thanks
Sharon
kalpa
Posted: Thursday, June 05, 2008 8:29:10 PM

Rank: Fanatic

Joined: 7/19/2006
Posts: 492
Location: Göteborg, Sweden
Yes, and very easy...

Just create a new template for your news page and load the same page but add ?altTemplate=newTemplateAlias to the page url. newTemplateAlias should of course be replaced with the alias for your new "minimalistic" template.

// ;) Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
Sharon
Posted: Thursday, June 05, 2008 9:03:56 PM
Rank: Enthusiast

Joined: 5/20/2008
Posts: 39
Location: Indiana, U.S.A.
Currently my news page has the template Textpage It has other properties like a headline, bodyText and a sidebar.
whatever is in the property "BodyText" is the text that I want to grab and use in Flash.

So you are telling me to create a new template for the news page but load the old template in it? I am sorry but I don't understand.
Can you be more descriptive?
kalpa
Posted: Friday, June 06, 2008 12:23:24 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 492
Location: Göteborg, Sweden
Hi Sharon!

I meant that you keep your current Textpage as-is don't ruin that one...

What you want to do is to add a new template "TextpageBodyContentOnly", minimalistic or anything that works for you, and add it as allowed template for the documenttype Textpage.

In the new template you insert nothing but the "getitem" tag for bodyText. (cut'n'paste from the full template)

If you now loads your news.aspx page and adds the altTemplate parameter to the URL:
You will get a call to a page called ../news.aspx?altTemplate=TextpageBodyContentOnly


Umbraco will render your page using an alternativ template that contains nothing but the bodytext...

// ; ) Kalle



" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
Sharon
Posted: Friday, June 06, 2008 7:22:29 PM
Rank: Enthusiast

Joined: 5/20/2008
Posts: 39
Location: Indiana, U.S.A.
Sounds good. I will try that. Thanks for the basic walk through.
It is understandable but sometimes once I get into it I get confused.
keep you fingers crossed.
:)

Sharon
Posted: Friday, June 06, 2008 10:19:16 PM
Rank: Enthusiast

Joined: 5/20/2008
Posts: 39
Location: Indiana, U.S.A.
Thank you very much.
It worked. So Smoooth too.

:d/
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.