This is a migrated thread and some comments may be shown as answers.

Base Urls & web folders

2 Answers 84 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 29 Apr 2008, 08:42 PM
Just purchased RadControls for ASP.NET to use the Editor.

But I am having trouble in that my secured "admin" for editing site content is in a folder called "~\admin\edit_content.aspx" and it can select and edit pages in any of the following locations:

~\
~\employees\
~\employers\

etc.

I have added the line:
RadEditor1.EnableFilter(EditorFilters.MakeUrlsAbsolute);
and I have mapped all the SiteMap links to the Custom Links drop down.

But depending on the page being edited, its path context differs so its access to resources is problematic unless all links to all resources and pages are absolute.  That in itself is an issue to make the site (just an IP address right now) go live with a domain name as all the absolute links will be pointing to the soon to be changed IP address and can't point to the old site where the live domain is now...

So long story short, is there any way to resolve URLs and fix them on entry and exit?

2 Answers, 1 is accepted

Sort by
0
Mac
Top achievements
Rank 2
answered on 30 Apr 2008, 01:36 PM
Not sure if this helps any but I've always found the following to be quite useful in making code portable between applications/domains

Page.ResolveUrl(

"~/myfolder/")

Mac.

0
Accepted
George
Telerik team
answered on 02 May 2008, 04:04 PM
Hi Mac,

"So long story short, is there any way to resolve URLs and fix them on entry and exit? " - at the moment there is no automatic way to resolve this links.

Your current approach is good. The only thing left you need to do is get the editor's content on the server and replace the string "http://ip.address" with nothing(""). This way all the links will become relative to the server (e.g. "/content/image.jpg") and will work after you change the server's address. Note that you need to do the change on the server before you save the editor content (either in a page or in a DB).

Sincerely,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Rob
Top achievements
Rank 1
Answers by
Mac
Top achievements
Rank 2
George
Telerik team
Share this question
or