Content Managed links

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
 
D

David

Hhhmmm.....

I guess I was a little verbose in my description of the problem.

The gist of the posting was about the resources required to change links in
CMS data on the render...

For example, in my CMS, if I make my links as truly dynamic as I can, such
like... <a href="guid:insert-guid-string-here"> and then search and replace
the guid string during the render, if I have a lot of links AND a lot of
traffic, will it impact on my server heavily?

Also, which would be the best way to search and replace? A looped
string.replace function or a regular expression replace?

If a regular expression replace, then does anyone have a sample regular
expression that may work?

One final thing that I haven't asked before, how would I test for any
performance loss by doing a replace on the render?


Some thoughts to help speed up the render process... tell me if I could be
way off the mark...
If I have a hidden field that I pass all the guid IDs that represent links
into and save that along with each page, I could then potentially during the
render pre-fetch the links that will be replacing the guids. What are you
thoughts and how would I best architect this?

Thanks.

Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top