Banner CMS

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

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

Hi,

My page contains banners which I use to put ads in. What i want to do is to be able to put my banner pic in my page through CMS but I also need to be able to position them in different div tags on different pages. Because my ads will be different form page to page. Now i've done it with multiple fiels in my content. ex: AD1 :Banner1 (pic), Banner2(empty), Banner3(empty) ; AD2:
Banner1 (empty), Banner2(pic), Banner3(empty) ; ...


so my code could be

<?php echo $record['Banner1'] ?>
<?php echo $record['Banner2'] ?>
<?php echo $record['Banner3'] ?> (but for my first page I don't need banner 3, so a delete it in my code.)



And now I have to leave out the one's I don't need or don't put anything in them in my CSM but what i really want is to have only one
<?php echo $record['Banner'] ?>
so i mean:

ad1: Banner
ad2: Banner
ad3: Banner

But all three bannerfields contain different pic's. So my PageViewer reads

<?php echo $record['Banner'] ?>
i want to become that in my html i can do

<div id="ad1"><?php echo $record['Banner'] ?></div>
<div id="ad2"><?php echo $record['Banner'] ?></div>
...

but every Banner should contain another pic instead of showing the same one.
Do you know what i mean?

Thans in advance like always
Berkowitz

Re: [Berkowitz] Banner CMS

By Dave - February 19, 2008

So, you have multiple banner fields. And some of the fields are filled out and some are blank. And you want a way to display all the banner fields that are not blank with a single variables and have them wrapped in div tags?

Is that right? If not give me some more detail and I'll keep trying! :)

Some questions: Are they text fields or upload fields? And are they extra fields in your content (eg: news, articles) or do you have a separate section editor for banners?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Banner CMS

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

To answer your questions. It are wysiwyg fields. And i have an seperate section where al my banners are.

i've put screenshots as attachment.

As you can see in my content.jpg attachment I just want to use 1 field for all my banners, but in every ad there's another pic.
Do you get what want? :). If not just keep asking the information you can use :).

Again thanks for all you're trouble your doing.
Attachments:

ads.jpg 88K

content.jpg 222K

Re: [Berkowitz] Banner CMS

By Dave - February 19, 2008

Ok, I'm still not sure I understand completely. What about this, where it shows which ever banner is first defined?

<?php
if ($record['Banner1']) { echo $record['Banner1']; }
else if ($record['Banner2']) { echo $record['Banner2']; }
else if ($record['Banner3']) { echo $record['Banner3']; }
else { echo "No banner available"; }
?>


That way you could use that code and it will always show the first banner that is available in one of those 3 fields.

Is that guess closer?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Banner CMS

no what i want is to replace banner1, banner2, ... by just Banner.

So in my ads I wanna have
Title
Banner
Content

but in every ad, banner is another pic. So now if I use my php code from de php generator

<?php echo $record['banner'] ?>

It would show my banners one by one underneath or next to each other, right?

But what I want is to position every banner in a div tag. Because I have 2 or more ads on a page.

Re: [Dave] Banner CMS

no sorry that's not what i mean... :).

those blank fields are erased. I don't what to have blank fields.
the only fiels I have are
Title
Banner
Content

that's how it is made (see attachement).

But in every ad, the pic in banner is different.
there are 2 or more ads i want to show on my page's.

so, in every ad Bannerfield is different.
<?php $record['banner'] ?> this is what i want in a div.

but when i use this he just shows every bannerfield in every div i put my code in. But I just want 1 bannerfield / div tag.

So i need some kind of recognition of which ad he has to show the bannerfield, I think.

sorry for my difficult question ... :) but thanks in advance.
Berkowitz
Attachments:

content_001.jpg 167K

Re: [Berkowitz] Banner CMS

By Dave - February 20, 2008

Ok, I think I've got it. You let me know.

You have a "Section Editor" for all your banners and a different section editor for your articles or content. Is that right?

You want to show some random banners from your banner section on your content page.

If that's right, you'd do it with a list viewer and limit the perpage to 3 (or however many banners you wanted) and set the 'where' to match the type of banner you wanted.

Another way, say you had 3 different types of banners (top banners, side banners, and bottom banners). You would use 3 list viewers. One to load each type of banner, and limit it to perpage 1 to only return 1 of each type.

Does that make sense?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Banner CMS

I have a section editor for my Ads. In every ad are both my banner and my content.

With a ListViewer I want to show my banners ($record['banner']) in different div tags.

so $record['banner'] contains in every ad a different pic. When i do ListView now he just show every banner of every ad. but I want to be able to filter out so i can show one specific banner in one specific div tag.

Re: [Berkowitz] Banner CMS

By Dave - February 21, 2008

Ok, how do you want to filter the banner ads? Do you have another field? What is the rule for when a certain banner should go in a certain div tag?
Dave Edis - Senior Developer
interactivetools.com