A couple of solutions from the web for putting the smartedit strips javascript problem. Thoughts on any of these? Not sure on RedDot version, I think 9, definitely pre-10.
1. Create a new template with a text element which is set to ASCII only and add your JS in this text element. You can connect the instance to a container within the page any run your Javascript inline. http://superuser.com/questions/253790/inline-javascript-with-reddot-cms-version-9 2. use a dummy body tag 01.<!IoRangeRedDotMode> 02./* <body>RedDot decoy</body> */ 03.<!/IoRangeRedDotMode> http://www.reddotcmsblog.com/smartedit-and-javascript -billb On Oct 25, 3:52 pm, Bill Bernat <[email protected]> wrote: > Thanks all for the advice on this. I am new to reddot, and I just > inherited a large site that I don't understand very well at all and > that's working (meaning I need to be careful not to break it), so I'm > a little worried about the foundation class solution. > > However, my solution of placing this in the contact us box isn't > working either, becuase what I actually ended up needing to include is > Optivy code, the snippet includes JavaScript, and the javascript get > stripped out when I save the content. > > Is there a setting I can change so that my javascript doesn't get > stripped out when I save? > > -billb > > On Oct 20, 1:29 pm, Jian Huang <[email protected]> wrote: > > > > > Hi Prasanth, > > > Actually, a typical project would have 3 foundations: Home Foundation, > > Generic Foundation, Article Foundation. > > > Oh, good point, placement of the javascript based code makes a > > difference in tracking, google guide here: > > >http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html > > > When google analytics runs, CMS have already finish generating the > > page. Please note that google analytics code should be in publish > > mode only rendertag code > > > <reddot:cms> > > <if> > > <query valuea="Context:CurrentRenderMode" operator="==" > > valueb="Int:2"> > > <htmltext> > > <!-- google code below --> > > </htmltext> > > </query> > > </if> > > </reddot:cms> > > > So when page hits within CMS wouldn't count. > > > On Oct 19, 9:44 pm, "Prasanth Nittala" <[email protected]> wrote: > > > > Hi Bill > > > I agree with Bill that it is not a good idea if you have too many > > > foundation classes, considering the maintainability. However just would > > > like > > > to point out, a good implementation would not have that many foundation > > > classes. You typically should have a foundation with header, body, footer > > > with some predefined pagedefinitions for handling differnt layout > > > variants. > > > Your placement will also be impacted based on what kind of data you are > > > thinking to analyze for the page and about accessing that data. > > > > Hope it helps. > > > > Thanks, > > > Prasanth > > > > -----Original Message----- > > > From: Jian Huang <[email protected]> > > > To: "Prasanth Nittala" <[email protected]> > > > Date: Wed, 19 Oct 2011 16:27:54 -0700 (PDT) > > > Subject: [reddot] Best Place to Put Analytics Code? > > > > Hi Bill, > > > > Welcome to the group. > > > > You are very close with your solutions. > > > > You can have the code hardcoded in your foundation content classes, > > > but with this method, if you have n foundation content classes, and > > > you need to change the code, then you have to change it n times. > > > Hence, this is definitely not a best practice and would get you red > > > flag in OpenText's health check audit. > > > > Since contact us module is a common module, adding the code there is > > > perfect because you will have a central place to maintain the code. > > > Like you said, not elegant because now you are mixing code of > > > different purposes in a single content class/page. > > > > But you did have the right idea, what if you create a > > > con_google_analytics container in all foundation content classes, > > > create a new content class that has the google analytics code, create > > > a page instance from the google analytics content class, use the > > > plugin Retroactive References 2 to retro actively reference > > > con_google_analytics in all foundation page instances to the google > > > analytics page. > > > > Plugin here:http://www.solutionexchange.info/Retroactive-References-2.htm > > > > If you need more information as a guide on what I am talking about, > > > take a look at how your site header or footer is handled in the > > > project structure. > > > > Good luck, > > > > -Jian > > > > On Oct 19, 6:42 pm, Bill Bernat <[email protected]> wrote: > > > > I need to place analytics code on our site. I can easiliy throw it > > > > into a contact us container that appears on every page, but that's > > > > kind of inelegent. > > > > > Is there a standard/best practice way to do this? I'm fairly new to > > > > RedDot, just inherited a site to administer. > > > > > Thanks, > > > > -billb > > > > -- > > > 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 > > > athttp://groups.google.com/group/reddot-cms-users?hl=en. -- 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.
