Sharing bits of your CMSMS site with other apps

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Sharing bits of your CMSMS site with other apps

Post by psy »

Sometimes it’s necessary to duplicate bits of a CMSMS site in other apps. In my case it’s typically either BigCommerce (by choice) or WordPress (by necessity).

It’s too much trouble to recreate from scratch different templates, content etc and doing so doesn’t address the problem of keeping both sites up to date.

Here is what I do.

1. In CMSMS create a page with content type "Section" and marked it to not display in the menu, inactive and name it eg "External Includes". Not only does it prevent it showing in your CMSM front end, sitemaps, etc, it makes it easy to identify in your admin page list.

2. Create a page template with only '{process_pagedata}{content}' and call it "Content Only"

3. Create a sub-page of "External Includes" called "Header" (or whatever is relevant to the bit you want to include in the other site) and set the template as "Content Only" as per above.

4. Copy the relevant sections of the CMSMS template (or Global Content Block, page content, menu tag, etc) in to the content of the External Include sub-page.

In the template of the relevant 3rd party application, I call/include the CMSMS page, eg

Code: Select all

<?php include 'http://www.mysite.com/external-includes/stuff-to-go-on-the-other-site.html’ >
This works well for WordPress and BigCommerce and should do so for other 3rd party apps that you want to appear as seamless with CMSMS.

Also means that you only need to update CMSMS for the changes to be reflected in the other app.

When you're duplicating content, be careful to ensure that the pages are different so you wont get penalized by search engines. To get around this, when I'm using a module I create different module templates. Same data, one data-entry, different output.

Have fun with it.
Psy
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Sharing bits of your CMSMS site with other apps

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: Sharing bits of your CMSMS site with other apps

Post by psy »

Thanks Rolf

Uniqu3 also has a solution that involves saving files as external html files for use in other apps.

Sadly I was unaware of his and your solutions when I needed an answer so came up with my own. :)

Works for me and no UDTs, modules, tags, php knowledge, etc needed. Just 100% everyday, pure CMSMS.
elkman
Power Poster
Power Poster
Posts: 262
Joined: Thu Jan 11, 2007 9:16 pm
Location: Colorado

Re: Sharing bits of your CMSMS site with other apps

Post by elkman »

Great idea. Could this be used in the same way to include a common calendar across multiple CMSMS sites?

Elkman
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: Sharing bits of your CMSMS site with other apps

Post by psy »

Anything that involves redirects within a module, eg calendar to detail can be problematic on the remote site as the link will be to a returnid on the CMSMS site.

You have to come up with ways (if possible) to prevent CMSMS doing the redirect, eg:

1. Shared content is a form. On the remote site, I submit the form via ajax.

2. Shared content is News. For the remote site, I limit the number of items shown and make a summary template that outputs all the data, ie summary and detail info. Again, using jquery, clicking on a summary to show the full article hides/shows the relevant content.

You could use option 2 if all you're showing is the Upcoming Events list. The full calendar would be impractical.

psy
Post Reply

Return to “Tips and Tricks”