External Links may not do what I expected or hoped.
- wakewatcher
- Forum Members
- Posts: 149
- Joined: Fri Dec 28, 2007 12:33 am
External Links may not do what I expected or hoped.
I promise I did a search (but I may have a search term disability) We are in the process of moving an old hand coded web site to a cmsms installation. For the transition I was just hoping to be able to use the 'external link' (or whatever) so that our old web page shows up in the content frame of cmsms. Instead it religiously overwrites the entire page or opens in a new frame (depending on the setting chosen). But really all I want is it to open up where fresh content would be had we re-written the content. -thx-
Re: External Links may not do what I expected or hoped.
External link is exactly that, a link to a new page or site. If you want to embed a file into your content or template (make sure you know what you're doing here.. is it an iframe you're after, or are you going to parse it to remove the <head>, etc?) you can use {fetch file='path/yourfile.ext'}
http://www.smarty.net/docs/en/language. ... .fetch.tpl
http://www.smarty.net/docs/en/language. ... .fetch.tpl
- wakewatcher
- Forum Members
- Posts: 149
- Joined: Fri Dec 28, 2007 12:33 am
Re: External Links may not do what I expected or hoped.
Thanks. Yes that makes sense. It's called what it is. Thanks so much for the pointer. {fetch} looks promising. I looked at the reference page and it looked very straight forward. For example to display yahoo.com into my page it appeared that the smarty command would be {fetch file='http://www.yahoo.com'}. I thought it would put it in the "content space" (iframe?) so maybe some scroll bars would keep it contained but what it does is breach the boundaries of cmsms page. Again I'm not looking for this as a long term fix but just an interim while we convert the pages to more typical cmsms.
Re: External Links may not do what I expected or hoped.
If the content in the old side is in a div with an id or class, or otherwise easy to differentiate, you could capture the fetch to a variable, then parse that through a regex to discard everything outside that div (or whatever). Smarty has some built-in regex functions, shouldn't be too hard to figure out.
- wakewatcher
- Forum Members
- Posts: 149
- Joined: Fri Dec 28, 2007 12:33 am
Re: External Links may not do what I expected or hoped.
That sounds like a plan. Thanks for the tips and pointers. That gives me something to work on.