Re-2: Minute HTML control in iRev

runrev260805 at m-r-d.de runrev260805 at m-r-d.de
Wed Nov 4 01:48:05 EST 2009


Hi,

i am an On-Rev user from the beginning, but it took about 4 months , before i  realized that it is so much easier to do. I nearly broke my neck before to get the html stuff done in the irev code. 
 
Maybe Runrev should mention on their On-Rev side that this is possible.  

Regards,

Matthias



-------- Original Message --------
Subject: Re: Minute HTML control in iRev (04-Nov-2009 6:45)
From:    Sarah Reichelt <sarah.reichelt at gmail.com>
To:      runrev260805 at m-r-d.de

> > but what would be "neat" easier and clearer would be (this is a fantasy
> > chunk.. but gives you the idea...)
> >
> >
> > <?rev
> > if len(tDefinition) > 350 then ?>
> >
> > # then use this plain html
> >
> > div style=\"margin: 15px;padding:2px 15px 2px 15px;\">
> > img src="/resources/lexicon/images/backgrounds/EyeGlass.jpg"
> > style="float:left; margin-right:12px;" />
> >
> > <?rev
> > else
> > ?>
> >
> > # use this plain html instead
> >
> > <div style="margin: 15px;background-color: #FFFFFF;padding:2px 15px 2px
> > 15px; opacity: 0.90">
> >
> > <?rev
> > end if
> > ?>
> >
> > <h1 style="text-shadow: +10% +10% 10% rgb(153,153,153);"><?rev put tWord
> > ?>:</h1>
> > <p style:"font-size: 115%;"> <?rev put tDefinition ?> </p>
> > </div>
> >
> > i.e. goal: based on conditionals, case statement etc. swap out entire 
> > chunks
> > of html without having to build those strings in the code itself, but 
> > rather
> > "talk" to the page as in: "Use this next section of html" or "skip this 
> > next
> > section of html"
> 
> 
> Nothing "fantasy" about this. I do it all the time and I reckon it is
> a lot easier than trying to quote the html so it can go into a put
> statement. So:
> 
> <?rev if x = 3 then ?>
>     <h1>x = 3</h1>
> <?rev else ?>
>     <h2>x <> 3</h2>
> <?rev end if ?>
> 
> is perfectly valid iRev code.
> It can get a bit messy, but format as neatly as you can, indent and
> add blank lines so that it stays readable.
> 
> Cheers,
> Sarah
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 
> 
> 
> To: use-revolution at lists.runrev.com





More information about the use-livecode mailing list