iFrame

5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 14, 2008   (RSS)

By Berkowitz - February 14, 2008 - edited: February 14, 2008

Hi,

I'm using your CMSBuilder v. 1.08, but I have a little problem. I've made an menu on the left side and an iFrame in the center. My links on my menu are generated by the ListViewer. Is it possible to load my PageViewer in my iFrame? If so, can you explain in full detail please.

Thanks in advance

Re: [Berkowitz] iFrame

By MikeB - February 14, 2008

Hi Berkowitz,

This should be something you can set up by making just two quick changes to the page you're working on.

First, modify the code for your iframe to add a "name" value. This means that your iframe code might look something like this:

<iframe name="pageContent" width="500" height="500"></iframe>

You'll notice I used "pageContent" as the name for this field. From there, you'll want to modify the line of code in your ListViewer that is creating the links for your menu. You'll be adding a "target" value so it'll look something like this:

<a href="<?php echo $record['_link'] ?>" target="pageContent"><?php echo $record['title'] ?></a>\

The "target" value tells this link to open in the pageContent iframe and this should give you the effect you're looking for.

Give this a try and let me know if you have any other questions! [:)]
Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com

&lt;hr /&gt;&lt;i&gt;&lt;a href=&quot;http://www.interactivetools.com/consulting/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Hire me!&lt;/b&gt;&lt;/a&gt;
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with &lt;a href=&quot;http://www.interactivetools.com/consulting/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Priority Consulting&lt;/b&gt;&lt;/a&gt;.&lt;/i&gt;

Re: [MikeB] iFrame

By Berkowitz - February 14, 2008

First off all, thanks for your reply.

<?php foreach ($listRows as $record): ?>
<a href="<?php echo $record['_link'] ?>" target="Frame"><?php echo $record['title'] ?></a><br/>
<?php endforeach ?>


That's the code I use to make my menu. Now what i want to do is when you click the link I want to show my $record['content'] that belongs to that title in my iFrame.

So in my CMSBuilder i have a field Title and a Field Content.

so i use my ListViewer to create my menu and adjust or remove the records in the php that I don't need. But what I don't now is where i have to put my PageViewer php code so that it would open in my iFrame

$options['viewerUrl'] = 'hardsoft.php#frame';

and also what to put in this value.

Thanks
Berkowitz

Re: [Berkowitz] iFrame

By Berkowitz - February 14, 2008

Never mind [:)]

I've figured it out that i just needed another PageViewer.php to load inside my frame and thanks to the target attribute in my frame code it loads the PageViewer in my Frame.

Thanks for your help earlier.
Berkowitz

Re: [Berkowitz] iFrame

By MikeB - February 14, 2008

Hi Berkowitz,

Thanks for the update!

I'm glad to hear that everything is working for you. Just let me know if you do have any other questions or comments! [:)]
Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com

&lt;hr /&gt;&lt;i&gt;&lt;a href=&quot;http://www.interactivetools.com/consulting/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Hire me!&lt;/b&gt;&lt;/a&gt;
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with &lt;a href=&quot;http://www.interactivetools.com/consulting/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Priority Consulting&lt;/b&gt;&lt;/a&gt;.&lt;/i&gt;