Page 1 of 1

News contents in an iframe?

Posted: Wed Aug 23, 2006 11:15 pm
by peto
Hi,

I'm trying to accomplish a fairly complicated css layout with some
javascript, flash content etc. There's a div containing the news
module, displaying titles. I don't want the page to reload
(thus resetting all the flash stuff etc) whenever the user clicks
the news titles...

I tried modifying the news summary template: replacing
the titlelink with some onclick javascript to write the news contents
into a special div:

{foreach from=$items item=entry}

{$entry->title}{$entry->content}';">{$entry->title}

{/foreach}

That works, but if the news content has any quote marks (for example
image tags), the javascript gets confused. I tried escaping the quotes in
the content, but that didn't seem to work either. Is there any way
around this problem?

Another option: I could use an iframe for the news content.
But how can I add target attributes to the title link? That should
be fairly easy by modifying the news module code but where?
I know html+css quite well but not much about javascript or php...

Thanks for any help!

Re: News contents in an iframe?

Posted: Thu Aug 24, 2006 7:48 am
by tsw
You might want to utf8 encode your strings..