Howto determine dev mode?

One of the cool things of radiant is that dev.yourdomain.com shows
radiant
in development modes… so you can see the draft pages…

BUT I would like to turn of some of the live scripts… like google
analytics
javascript. Is there an easy way to determine if a page is rendered in
development mode ?

Thanks,

Peter

Peter B. wrote:

One of the cool things of radiant is that dev.yourdomain.com shows radiant
in development modes… so you can see the draft pages…

BUT I would like to turn of some of the live scripts… like google analytics
javascript. Is there an easy way to determine if a page is rendered in
development mode ?

Not presently. You could make a <r:if_dev> and a <r:unless_dev> tag to
fix the problem. I’d probably even accept a patch for these tags. They
seem generally useful.


John

Hi John,

Thanks, I will give a shot at it. Seems like a good way to return
something
back to the community :).

Peter.

On 7/16/07, John L. [email protected] wrote:

Site: http://lists.radiantcms.org/mailman/listinfo/radiant


met vriendelijke groet,

Peter B.

I have a rough version ready… but I’m still learning some internals so
I
can write the proper test code as well.

Added the patch to this ticket:
http://dev.radiantcms.org/radiant/ticket/517

Any comments on how this should (and could!) be better are highly
appreciated.

Thanks

Peter.

On 7/16/07, Peter B. [email protected] wrote:

On 7/16/07, John L. [email protected] wrote:

Site: http://lists.radiantcms.org/mailman/listinfo/radiant


met vriendelijke groet,

Peter B.


met vriendelijke groet,

Peter B.

Basis test code

http://pastie.caboo.se/79264

The if and unless tags rely on the request object from the page. That
way
the host can be accessed. I can’t seem to simulate that in the test.

Anyone with some insight?

Thanks

Peter.

On 7/16/07, Peter B. [email protected] wrote:

Thanks

something back to the community :).

in development modes… so you can see the draft pages…
seem generally useful.

met vriendelijke groet,

Peter B.


met vriendelijke groet,

Peter B.