Is it possible to share 2SXC Content modules between portals on the same DNN instance? - dotnetnuke

2sxc 11.x / DNN 9.x
I have a DNN instance with a portal with lots of Content modules with different Content Types and Templates. I'm going to be making a second portal that is related to the first portal and there is some shared content. Is it possible to allow the first portal to share it's 2SXC content types and templates with the second, new portal? If so, how?

There are a LOT of ways to do this, and unfortunately there is no good guidance document 😟.
Your scenario sounds like what you would need Ghost-types for: one app creates the real type, the other app just has a ghost-reference for the original type. This is a common way to solve this - and yes, it's a very well kept secret 😉.
But I went ahead and created a checklist, just for you 🚀 https://azing.org/2sxc/r/Pj4GMYY5

Related

get 2sxc app data from different portal DNN

We are setting up different sites as portals in DNN. Some content will be shared across the different portals.
I'm using the following method to render 2sxc data in a page
http://2sxc.org/en/blog/post/using-2sxc-in-webforms-custom-webapi-or-other-razor-hosts-300
However, now i want get the same data in another page of a different portal.
Can any one help with the code so i just put in the source portal id and it can be rendered in a different portal?
Yes, this can be done :)
There's an App Data DataSource, where you can specifiy the portal and app-id (in 2sxc 8.5+). Use this in a visual query or in your code.
http://2sxc.org/en/Docs-Manuals/Feature/feature/9266

Locomotive CMS Detect and Display Views for Mobile

I have a LocomotiveCMS site up and running on Heroku. I can edit my templates locally and push using Wagon. It works great!
However, I'd like to be able to serve a separate set of views for mobile devices (phones really) vs desktop/tablet. Can it be done easily? Will it require large modifications to the engine?
EDIT: I should add that I have done this before for a basic Rails app with no issues. I know how to detect a mobile device by examining the user agent and creating a separate folder (such as views_mobile) to store the mobile views. Would like to be able to do the same for LocomotiveCMS
That's a tough question. For the next version of LocomotiveCMS (v3), we'll use a full stack of middleware so that it will be easy to add your own custom behaviors.
But, for the current version of the engine, it's not that easy. However, I'm thinking about something. Perhaps you could create a Route constraint for the mobile detection (http://guides.rubyonrails.org/routing.html#advanced-constraints).
Then, you would modify your routes.rb by adding this:
match '*path' => 'locomotive/public/pages#show', page_path: 'mobile-index', constraint: MobileContraint.new
Never tested so it might not work :-) Happy patching!
Didier

How to create different registration form in Drupal7 when anonymous user can't view published pages?

To resolve this problem on my own, I started out by installing Profile2 and Profile2 registration. At no point was I able to generate a page based on the user name (eg, {domain}/private/register). I figured it was not coming up b/c I checked off that anonymous users could not see published pages (which is a site requirement). However, I might have done something wrong but I went over the instructions several time and I don't think I made a mistake. Any suggestions would be helpful.
I think you may have to create a new content type, similar to the normal story or article types, and publish restricted content as the new page type. Apply the access restriction to this content type, and leave the default content types alone.

Remove site from DotNetNuke

My company has a enrollment website that is currently in DotNetNuke. I've been directed to "strip out nuke from the site" but from everything I've read it is the opposite that the site is in dnn not the other way around.
Has anyone had to migrate a site from dnn and if so can you point me towards some resources or give some insite to get me started?
The site is dnn 5.04
If you want to strip things down to absolute bare bones (HTML, images, JavaScript), you could use a tool that basically copies down an entire website to your local machine, such as HTTrack.
Download the app, give it your DNN website's URL, and it'll spider the entire website, download each page individually, along with any of its images and scripts. You'll be (theoretically) left with a full website containing all your content pages, which you can edit in a plain text editor.
All the user management, role management, content management, admin only areas, protected content, etc. will not carry over with this method, but that will be the case regardless if you're moving from DNN to a normal static HTML website.
An "enrollment website" sounds more like an application than a static HTML site and if that's the case then just grabbing the rendered HTML isn't going to be the best option as you wouldn't get any of the functionality. My approach would be to first find out why they want it pulled out of DotNetNuke. Perhaps it was poorly implemented and they are blaming DNN when the problem was actually how it was built. DNN may be a good solution and it might be best to convince them to leave it as DNN but improve the implementation.
If you do need to pull an application out of DNN and the enrollment piece was built as a custom module, it should be fairly easy to convert the ascx files of the custom module to normal .net User Controls.
If the Enrollment application was built using a Forms Module of some form, then you will likely need to rebuild it from scratch.

CakePHP Mobile Website

Any idea, how can we create already running website to Mobile Website?
Are there, ready made plug-ins / components available ?
I've found some like wapple.net however it is paid one, which is not feasible for client's budget.
I have found, XML creations is pretty easy in CakePHP, though your ideas would be appreciated.
Kindly share more details on the same !
Regards,
i dont think that you'll find a plugin that will transform your website for mobile. because there are too many decisions to make when creating a mobile web, for me it's like creating a completly different website with only the necessary information that your website has..
But maybe there are components that might help you with the small taks (like detecting the user agent and stuff).. here you can read two good articles about creating a mobile website:
http://www.smashingmagazine.com/2010/11/03/how-to-build-a-mobile-website/
http://www.smashingmagazine.com/2009/01/13/mobile-web-design-trends-2009/
There's also a few JS frameworks that will help you with the interaction with the user, i've only used Sencha touch..
But my guess is that you'll have to adapt/create "manually" the css, html and js for mobile, and I don't think that there's a magical tool to do that, you'll have to do it yourself (or pay someone to do it =D)
Hope this helps, Good Luck!
You may be interested in my answer over here:
CakePHP v2.2.1 Solution (+ Cookies to persist mobile/desktop/other layout)
In a nutshell:
Lets you setup mobile layouts /Views/Layouts/mobile/default.ctp
Mobile views /Views/Pages/mobile/home.ctp
Sets a template variable $is_mobile
Lets you force a specific layout ?forcedLayout=desktop, and remembers this in a COOKIE
If no layout is forced it uses CakePHP's User-Agent detection to make the decision $this->request->is('mobile')
If no ../mobile/ layout or view file exists then it falls back to the default layout or view.
Typically with cakephp you want to create a separate view layout for mobile viewing. The app controller should change the default view layout to the mobile one when detecting a mobile browser.
Your mobile view layout should be made by you, only you know what data on your site is important and what is not (aka, what should be removed /kept for mobile viewing) Also your mobile layout can use alternate CSS and only load the elements you want.
To learn more about creating views in cakephp see the cookbook:

Resources