D
David
Hi all,
I have the same problem on 2 different CMSs. One is my own CMS, the other
one of my clients own CMSs.
My CMS is written in .NET 1.1, my clients CMS is written in .NET 2
Both have url-rewriting in place.
Basically, we both have a wysiwyg editor and a pop-up to create a link. On
the link pop-up, we can either enter a URL directly or press a browse button
for another pop-up. The second pop-up has a treeview (mine uses MS treeview
control, the other uses telerik). The treeview represents the site
structure.
Currently, when a node is clicked on the treeview, the URL will then be set
to the selected path, but as a relative path. This is where I realised that
both CMSs have the same problem.
The underlying structure of the CMS are different... my clients has a
'back-office' editor where mine edits in the actual page, so that you know
exactly what the page will look like.
Currently, in my clients (back-office editor), I have had to set up a
frontendWebRoot value in web.config. This will then pass the link as an
absolute link. However, I don't really like this route as it is not very
flexible, i.e. if the page moves, gets deleted or the webroot changes or
whatever, then you have a floating URL doing nothing.
Mine is a little more awkward as my backend system is exactly the same as my
front end system, except that I have a deployment system in place. (my
back-end system will connect to a webservice to deploy the content to the
live site).
I am looking for ideas on managing the URLs that could work on both CMSs.
I am thinking that the worst place to do the URL manipulation is at the
render of the page. My initial thoughts (and there are other reasons why I
still favour this) are:
In the insert URL (during wysiwyg edit), don't insert the location but
insert a string... suchlike "guid:<guid-of-page-to-link-to>". In the
frontend render of the page, search for all instances of
guid:<guid-of-page-to-link-to> and replace them with the actual page.
If I do this, what are the consequences? i.e. will it be a major hit on
resources and time if I have a lot of links?
What would be the best way of handling it? (string.replace or regular
expression)
If regular expression, can anyone give me an expression to cover it? (The
link will be something like... <a href="guid:ae43d-234ae-44387-3987eda">
(or whatever a guid looks like).
Any other ideas on how to achieve this?
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
I have the same problem on 2 different CMSs. One is my own CMS, the other
one of my clients own CMSs.
My CMS is written in .NET 1.1, my clients CMS is written in .NET 2
Both have url-rewriting in place.
Basically, we both have a wysiwyg editor and a pop-up to create a link. On
the link pop-up, we can either enter a URL directly or press a browse button
for another pop-up. The second pop-up has a treeview (mine uses MS treeview
control, the other uses telerik). The treeview represents the site
structure.
Currently, when a node is clicked on the treeview, the URL will then be set
to the selected path, but as a relative path. This is where I realised that
both CMSs have the same problem.
The underlying structure of the CMS are different... my clients has a
'back-office' editor where mine edits in the actual page, so that you know
exactly what the page will look like.
Currently, in my clients (back-office editor), I have had to set up a
frontendWebRoot value in web.config. This will then pass the link as an
absolute link. However, I don't really like this route as it is not very
flexible, i.e. if the page moves, gets deleted or the webroot changes or
whatever, then you have a floating URL doing nothing.
Mine is a little more awkward as my backend system is exactly the same as my
front end system, except that I have a deployment system in place. (my
back-end system will connect to a webservice to deploy the content to the
live site).
I am looking for ideas on managing the URLs that could work on both CMSs.
I am thinking that the worst place to do the URL manipulation is at the
render of the page. My initial thoughts (and there are other reasons why I
still favour this) are:
In the insert URL (during wysiwyg edit), don't insert the location but
insert a string... suchlike "guid:<guid-of-page-to-link-to>". In the
frontend render of the page, search for all instances of
guid:<guid-of-page-to-link-to> and replace them with the actual page.
If I do this, what are the consequences? i.e. will it be a major hit on
resources and time if I have a lot of links?
What would be the best way of handling it? (string.replace or regular
expression)
If regular expression, can anyone give me an expression to cover it? (The
link will be something like... <a href="guid:ae43d-234ae-44387-3987eda">
(or whatever a guid looks like).
Any other ideas on how to achieve this?
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available