Re: phantom <table> tags

Mugur Rus <[email protected]> Tue, 2 Aug 2005 14:07:58 -0700 (PDT)
Newsgroups gmane.comp.cms.campsite.general
Message-ID <[email protected]>
--- [email protected] wrote:
> Actually, I'm trying to follow the manual in Section 3.5.3 "Including=20
> Images in the Section Listing," where it advises:
>=20
> The answer is quite simple. Create a body field in your Article Type th=
at=20
> will only contain the image that goes into the section listing. Let's s=
ay=20
> we call this variable 'sectionimage'. Then all you need to add in the=20
> section listing to display the image is:
> <!** print article sectionimage>
> This will then generate the HTML code as saved in the database. And in =
our=20
> case that means it will create the image tag including the image. You=20
> could even generate a little subtitle for the image in this field when=20
> entering the article text and images.
Yes, this is an old example but it's not the only way and maybe not the b=
est
way.

> What I want to do is display the article's image on the front page - no=
t=20
> its text - if the 'display on front page' checkbox is ticked. So I pres=
ume=20
> the template language statement would include first an If statement for=
=20
> whether the article is on the front page, but how do I tell the parser =
the=20
> number of the photo, when this will be changing?
<!** list article onfrontpage is on>
    <!** if image 100>
        <img src=3D"/cgi-bin/get_img?<!** urlparameters>">
    <!** endif>
<!** endlist>
Now, you'll have to come up with a convention like: "all images that are =
to be
displayed on the front page will have the number 100".

The image number is like a label, it's just that you can't name them with=
 words
but you have to use numbers. Think of it this way: number 1 is for displa=
ying
together with article short intro on the front page, number 10 is thumbna=
il for
headlines (when you display a list of article headlines in a RSS feed), 2=
0 and
up are for use in article body fields.

Mugur

> Mugur Rus <[email protected]>
> 08/02/2005 10:47 PM
> Please respond to campsite-support
>=20
> =20
>         To:     [email protected]
>         cc:=20
>         Subject:        Re: [campsite-support] phantom <table> tags
>=20
>=20
> Don't display images from article fields, instead use template language=
:
>=20
> <!** if image [image_nr]>
>     <img src=3D"/cgi-bin/get_img?<!** urlparameters [image_nr]>">
> <!** endif>
>=20
> See the manual for more details.
>=20
> Mugur
>=20
> --- [email protected] wrote:
> > Hi all,
> >=20
> > I've run into what may be an undocumented feature, but wanted to ask=20
> about=20
> > it anyway.=20
> >=20
> > I'm on 2.2.2 (expecting to upgrade to 2.3.0 any minute now) and want =
to=20
> > display the image from an article. The image field is called=20
> > 'teaser_image'.
> >=20
> > The template looks like this:
> >=20
> > <!** List Article OnFrontPage Is On>
> > <!** Print Article teaser_image>
> > <!** EndList>
> > <!** endlocal>
> >=20
> > The output, however, includes an entire table for the image:
> >=20
> > <table border=3D0 cellspacing=3D0 cellpadding=3D0 align=3Dnone>
> > <tr><td align=3D"center"><img src=3D"/cgi-bin/get_img?NrArticle=3D2&N=
rImage=3D1"=20
>=20
> > alt=3D"RDFW bunker" BORDER=3D0 HSPACE=3D5 VSPACE=3D5></td></tr>
> > <tr><td align=3D"center" class=3D"caption">RDFW bunker</td></tr>
> > </table>
> >=20
> > Seeing as I'm trying to avoid tables at all costs, I want to suppress=
=20
> all=20
> > this junk. But how?
> >=20
> > doug
>=20
>=20
>=20
> =20
> ____________________________________________________
> Start your day with Yahoo! - make it your home page=20
> http://www.yahoo.com/r/hs=20
> =20
>=20
>=20
>=20



	=09
____________________________________________________
Start your day with Yahoo! - make it your home page=20
http://www.yahoo.com/r/hs=20
=20