News contents in an iframe?

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
peto

News contents in an iframe?

Post 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!
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: News contents in an iframe?

Post by tsw »

You might want to utf8 encode your strings..
Post Reply

Return to “Tips and Tricks”