Hi Richard. Thanks for clearing this up for me. So it's a dead end - I simply cannot use .NET/CSharp for live content.
So I assume, that I'll need to port this part of template to RenderTags (<reddot:cms> </reddot:cms>)? After some googling I found only "Navigation manager cheat sheet.pdf", maybe there are other usable references? Many thanks. Richard Hauer (5 Limes) wrote: > Hi Kristaps, > > What you have done is a mish-mash of .Net and LiveServer code. You > must remeber that the .Net code is executed on the CMS, at page build > time, while the LiveServer code is executed at run-time on the > production server. Bear in mind the URLs that will be executing at > these two different times will be very, very different. > > Your "fixed" code above simply emits the liveserver tags when the year > is 2010. I can't really paste you improved code because your fragment > is missing too many details, but whay you need to understand is that > you are layering different types of code that will execute at > different times. > > Your observation that RedDot "parses C#, and *then* rde-dm tags" is > right but for the wrong reason. In fact RedDot isn't parsing either > the C# or the rde-dm tags. What is happening is that your pre-execute > tags are passing a bunch of code to the ASP.NET compiler and returns > the results to your template. The final page is then sent to > LiveServer, where the rde-dm tags will be evaluated at run-time. > > If you care to post your entire template I might be able to give you a > better approach (or at worst, an alternative approach). > > HTH. > > > Regards, > Richard Hauer > ==================== > 5 Limes Pty Limited > www.5Limes.com.au > > > > On Sep 19, 8:27 pm, Kristaps Karlsons <[email protected]> > wrote: > >> Hey, it seems like no one ever faced this problem, but anyway, here goes >> nothing. >> >> I actually sorted it out - I just had to escape with backslashes rde-dm >> tags. >> >> But now I have a slightly different problem now - I cannot compare, nor >> get passed string length, as RedDot parses C#, and *then* rde-dm tags, >> etcetera, etcetera. >> >> <!IoRangePreExecute> >> <% >> string getCat = "<rde-dm:attribute mode=\"read\" attribute=\"cat\" >> source=\"request\" />"; >> string getYear = "<rde-dm:attribute mode=\"read\" attribute=\"year\" >> source=\"request\" />"; >> Response.Write("cat: " + getCat + "<br /> \nyear: " + getYear + " and >> getYear length is: " + getYear.Length + "<br />\n"); >> if (getYear == "2010") { >> Response.Write("You nailed it!");} >> >> else >> { >> Response.Write("failYear");} >> >> %> >> <!/IoRangePreExecute> >> >> This stealed allready two days for me (and dropped 2 lb's, I guess). Who >> knew it, that rde-dm tags need to be escaped with backslashes, not >> double quotes? >> >> Thanks >> >> >> >> Kristaps Karlsons wrote: >> >>> Ok, I found some information about this topic (+ got access to live server). >>> >>> Here goes the magic: >>> >>> <!IoRangePreExecute> >>> <% >>> if (isPreview != true) { >>> %> >>> <!IoRangeNoRedDotMode> >>> <rde-dm:attribute mode="condition" source="request"> >>> <rde-dm:constraint> >>> request:parameter1 EQ 'debug' >>> AND request:parameter2 NE '' >>> </rde-dm:constraint> >>> <rde-dm:if> >>> >>> this will be visible, if parameter1=debug, and parameter2 is defined >>> >>> </rde-dm:if> >>> </rde-dm:attribute> >>> <!/IoRangeNoRedDotMode> >>> <% >>> } >>> %> >>> <!/IoRangePreExecute> >>> >>> ^ It solves almost nothing. It's not dynamic and scalable. >>> Is there any way, I can write these values to variable? >>> >>> Thanks! >>> >>> On Fri, Sep 11, 2009 at 14:16, Kristaps Karlsons >>> <[email protected]> wrote: >>> >>>> Hi. >>>> >>>> Has anyone tried this? I have currently access only to dev server >>>> (publishing server is not up yet) - and Page.Request.Url.ToString() >>>> fails, and silently chops off all given parameters (?param=0¶m=1 >>>> [..]). >>>> I'm developing on RedDot 7.5 - maybe it's some sort of server setting >>>> that i need to enable/disable? >>>> >>>> Thanks in advance for any information- Hide quoted text - >>>> >> - Show quoted text - >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en -~----------~----~----~----~------~----~------~--~---
