kentico_borisp
-
3/15/2011 12:07:44 PM
RE:URL Rewrite possibilities
Hello,
The aspx approach supports webparts. You can place a webpart onto an aspx page by navigating to the webparts folder and drag and dropping the webpart onto your page. An example can be found on our Sample Corporate ASPX site in the file "CMSTemplates\CorporateSiteAspx\Offices.aspx" (please note the WebPartContainer tag).
I am a bit confused on the redirect conditions here. I assumed, you want to check those links inside a webpart which displays those links (e.g. a repeater). In that case you would need to modify this webpart to check the links against your database. Anyway, if you want to do this test by default on a page, then you can place a webpart (or control) on it to check the links (requests). This check can be also implemented in the Global.asax.cs file, in the Application_BeginRequest method, which is called everytime a new request enters the application. To check if your site is in design mode you can either check the URL or the ViewMode cookie if available:
using CMS.CMSHelper; ... ViewModeEnum currentMode = CMSContext.ViewMode;
switch (currentMode) { case ViewModeEnum.Edit: //you are in the edit mode break; case ViewModeEnum.LiveSite: //you are on the live site break; }
Best regards, Boris Pocatko
|