New Great Site on mojoPortal: OnlyNaturalFood.com

If you are using mojoPortal, let us know. We've put a lot of work into this project and it would be gratifying to hear from you. If you are using mojoPortal for a public site, post your URL here and show it off.

This thread is closed to new posts. You must sign in to post in the forums.
3/23/2010 6:08:19 AM
Gravatar
Total Posts 5

New Great Site on mojoPortal: OnlyNaturalFood.com

Announcing a new great site built on mojo Portal: onlynaturalfood.com . Its a portal focused on natural foods and recipes. We have bloggers, product reviews and recipes. Other sections coming soon!

We are also launching a periodic giveaway - this week name your favorite natural food and you can win a $50 AMEX gift certificate!

The site was based on the customized 2.3.3.9 version of the mojoPortal. Due to our requirements - we needed urls such as this:

http://onlynaturalfood.com/recipe_739_Spicy_Bean_Salad.aspx or this: http://onlynaturalfood.com/product_1598_Brad_s_Organic_All_Natural_Blue_Tortilla_Chips_1_Case_12_Bags_.aspx

Mojo would only support url such as this this:

http://onlynaturalfood.com/recipe.aspx?recipename=739_Spicy_Bean_Salad

which is less SEO friendly then the first one we had to use 3rd party ul rewriter (intelligencia rewriter - an open source regex based component) and it worked! Mostly that is. We had to do certain modification to the editblog.aspx page but other than that the site works flawlessly.

Thank you Joe!

3/23/2010 6:46:43 AM
Gravatar
Total Posts 18439

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Hi,

Congrats on your new site, it looks great! I've added it to our site list.

It is a shame if you had to fork mojoPortal and cut yourself off from upgrades. Hopefully you managed your customizations without making changes to mojoPortal code or else cloned the features you needed to modify.

I'm not sure where you got the idea that we don't support urls like http://onlynaturalfood.com/recipe_739_Spicy_Bean_Salad.aspx, you can easily create urls like that for pages or blog posts with our built in friendly url system and for custom features you could also have used our internal friendly url system the same as we do in included features.

At any rate, glad you were able to achieve your goals.

Best,

Joe

3/23/2010 7:52:51 AM
Gravatar
Total Posts 5

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Joe,

Perhaps I missed something in the documentation but what we needed to achieve was to dynamically create pages upon adding new foods, recipes or categories to the site.

So If I'm adding a recipe "Natural Maple Chicken" I would like to have a page onlynaturalfood.com/<someid for recipe module to work>natural_maple_chicken.aspx with recipe details. Obviously I can achieve the url with mojo but I don't want to go to admin and create a page everytime I add an object (recipe, category or natural product).  What I needed is a ability to map a group of pages to one host page for type of object based on (regex) pattern. I could not find that in the documentation

(obviously hostpage.aspx?object_name_and_id would work but as I mentioned this is less SEO friendly)

Is there another way? I would gladly reverse and go back to full mojo compatibility.

Kris

3/23/2010 8:39:40 AM
Gravatar
Total Posts 18439

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Hi Kris,

Since you said you had to modify the blog edit page I assume you used a modified version of the blog. The blog feature is a good example of how it can be done. The blog module is the part of the blog that lives on a CMS page and it shows a list of recent posts, but the post links go to the /blog/ViewPost.aspx?pageid=x&mid=y&itemid=z but the user sees a friendly url like /title-of-blog-post.aspx which our internal url re-writer maps to the real url.

So if I were implementing a recipe module I would use the same pattern, I would have a pageable list of recipes in the module control and link to detail pages usingfriendly urls. You can see from studying the /blog/EditPost.aspx.cs how the friendly url is created from code. So the friendly urls are created automatically when a blog post is made and it does not require creating a new CMS page. CMS pages do use friendly urls, but friendly urls can be used to map to any real url supported by any feature. WebStore also makes friendly urls for products and offers and my Event Calendar Pro feature makes friendly urls for event detail pages.

I will be covering this more as I complete the rest of my video training series. I plan to cover how to implement friendly urls and how to make a feature searchable in our search engine.

Best,

Joe

3/23/2010 8:52:48 AM
Gravatar
Total Posts 5

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

I totally get what you are saying. I was actually thinking about something similar on my way to office before reading your post. What we could have done is in the internal admin module when creating a recipe (or any other domain specific) object (in our custom tables) also programmatically create and configure a mojopage with the friendly URL of the object that is being edited. That is still a possibility.

Thanks! 

3/23/2010 9:12:38 AM
Gravatar
Total Posts 18439

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

H Kris,

You don't need to create a mojo page, it is sufficient to create a friendly url assuming your custom feature has a real page to map to with query string params.

So the RecipeModule.ascx would be the part that is hosted in a mojoportal CMS page and it would have a pageable list of recipes that links to say /recipes/RecipeDetail.aspx?pageid=x&mid=y&recipeid=z but instead of linking directly like that with the query string params, you would create a friendly url that points to the real url using our FriendlyUrl business class. Then what you need is an extra field on your recipe object/table where you also store the friendly url for the recipe like ~/my-bbq-chicken.aspx. The reason to store it also in your feature table is simply so you know how to link to it from the pageable list.

In addition to passing in feature specific params for your real url (RecipeDetail.aspx for example), you must also pass pageid and module id as pageid=x &mid=y 

These params are used for helper methods to enforce cms page security on feature pages  and it also keeps the menu highlighted correctly.

I recommend have a guid column on your recipe table and keep a unique guid there for each recipe. This guid can be stored as the pageGuid on the FriendlyUrl object which allows you to delete the friendly url if you delete the recipe.

You can just generate the friendly url based on a patttern like replace spaces with underscores or dashes and add the .aspx. We also have a method SiteUtils.SuggestFriendlyUrl(txtTitle.Text, siteSettings); that can be used to suggest a friendly url that doesn't already exist in the site. It replaces white space with a single dash and cleans out characters not suitable for urls.

In the blog we use a web service and javascript to suggest a friendly url from this method but allow the user to override our suggestion.

Hope it helps,

Joe

3/23/2010 9:36:19 AM
Gravatar
Total Posts 5

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Thanks. You are right, no need to duplicate entries between mp_pages and mp_friendlyurls.

I'm assuming that you are feeding friendlyurls to the search engine indexing?

Kris

3/23/2010 9:42:55 AM
Gravatar
Total Posts 18439

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

To make a feature searchable in the mojoportal search engine, you have to implement an indexbuilderprovider for your feature.

http://www.mojoportal.com/makingcustomfeaturessearchable.aspx

For any feature where you create friendly urls, you should also create a feature specific sitemap.ashx url that can be submitted to google and other search engines. So for example the blog has /blog/BlogSiteMap.ashx which can be submitted to google as a site map. This is discussed on the bottom of this page:

http://www.mojoportal.com/search-engine-optimization.aspx

Hope it helps,

Joe

3/23/2010 3:06:25 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Wow, that's a nice looking site! I'm glad you and Joe had that discussion about friendly URLs for custom features. I'm not sure if we'll need to use that, but it's very nice to know that it's available.

BTW, you may want to change the favicon.ico in your skin folder to something unique. Maybe a carrot?  cheeky

3/23/2010 5:35:04 PM
Gravatar
Total Posts 5

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Hey thanks

I know about favicon. On the todo list....To many projects not enough time.

4/3/2010 9:28:03 PM
Gravatar
Total Posts 131

Re: New Great Site on mojoPortal: OnlyNaturalFood.com

Just to chime in. I was able to do what Joe is suggesting for classes on Yamisee. No need to write a custom module.

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