Canonical URL

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/21/2012 3:35:25 AM
Gravatar
Total Posts 19

Canonical URL

Hi Joe,

We have a results page that displays lots of different [individual] records depending upon the id on the query string.  We currently add friendly urls for each record. 

For example we have:

  • MNF6471-Neolithic-adze          mapping to     ~/Default.aspx?pageid=10&UID=MNF6471
  • MNF8593-Polished-axehead   mapping to     ~/Default.aspx?pageid=10&UID=MNF8593

But the canonical url is always <link rel='canonical' href='http://nhe/singleresult.aspx' />

Is there a way to get the canonical url to use the friendly url?

Thanks

Stewart

 

11/23/2012 8:57:36 AM
Gravatar
Total Posts 18439

Re: Canonical URL

I don't recommend implementing a feature the way you have done it. You should use a supporting page instead of trying to make the module on the CMS page do everything by linking back to it with new urls and extra params. The CMS page does not know about your friendly urls or parameters, it only knows about the url from page settings and that is the canonical url as far as it is concerned.

If you use a supporting page like other features in mojoPortal then you have control over the canonical url and must set it yourself.

The module is meant to be the entry point for the feature, for item details it should link to one or more supporting pages and pass the page id and module id (along with any other params you need). Study the existing features like Forums, Blog, or WebStore for examples.

Hope that helps,

Joe

11/26/2012 5:05:23 AM
Gravatar
Total Posts 19

Re: Canonical URL

Hi Joe,

Thanks for the reply.  I'm now looking at re-factoring the code to work as its own standalone feature, like the webstore etc.

Stewart

You must sign in to post in the forums. This thread is closed to new posts.