Using Zurb Foundation in Kentico CMS Portal Engine - zurb-foundation

I need to use Zurb Foundation front-end framework and Kentico CMS v7's portal engine development model. When I import the framework CSS into the CMS and apply the Foundation style sheet to a Page Template, the CMS styles and Foundation styles step on each other making the Design tab pretty much useless for the user:
No style applied:
Style applied:
I am wondering if I need to prefix styles in the Foundation CSS classes to try to prevent conflict, however my initial quick attempts didn't seem to have much affect.
Is there a way to include the Foundation CSS in a way that doesn't prevent portal engine development?

Only thing i can think of now is to add the CSS conditionally.
Put
<%= CMS.CMSHelper.CMSContext.ViewMode != CMS.PortalEngine.ViewModeEnum.Design ? #"<link rel=""stylesheet"" href=""http://www.zurb.com/assets/foundation.top-bar.css"">" : "" %>
into a page layout. I tried to add this to layout of master page (Root document -> Master page -> Edit template properties -> Layout) and it works fine. But it will add the CSS to the . Unfortunately this code does not get resolved in head section of master page.

Related

Django CMS CSS styling

so I’m working with Django and I’m trying to figure out how in the edit the CSS using nothing but Django CMS?
Is there a way?
Anything would be helpful.
Django CMS does not have any inline editing features of CSS or any other markup. This is by design and it is not something like Wordpress.
To edit CSS you will need to create your own css files as part of your project.
If you need to add eg an HTML or CSS snippet into a page, there's an offical plugin for that 👌 - https://github.com/django-cms/djangocms-snippet
And as #Aiky30 said, the global CSS code is better to place in static in accordance with django best practices.

Ionic2 web app routing configuration

I am working on ionic2 project, which is web project (i.e. runs as a website on browsers not a mobile app). Here I am facing difficulty to give specific URL for pages. How do I implement routing in my project ?
I also worked with angular2. Where we can give URL to components. But here that thing is not working.
Take a look at this website: https://www.joshmorony.com/a-simple-guide-to-navigation-in-ionic-2/
and read up on the nav controller here: https://ionicframework.com/docs/api/navigation/NavController/
Some Context: While Ionic2 does use the native browser for each platform, it uses a special controller to change routes
NavController is the base class for navigation controller components like Nav and Tab. You use navigation controllers to navigate to pages in your app. At a basic level, a navigation controller is an array of pages representing a particular history (of a Tab for example). This array can be manipulated to navigate throughout an app by pushing and popping pages or inserting and removing them at arbitrary locations in history.
Before diving deeper into Ionic I suggest obtaining an understanding of this controller.
This sample ionic project will also help with the understanding of navController:
https://github.com/ionic-team/ionic2-starter-sidemenu

Deep Linking in Foundation For Apps

I am new to Foundation for Apps and am trying to get deep linking to work with the zf-tabs directive. Basically, I have a view with tabs and I am trying to use $state.go in my controller to navigate to the view and activate a particular tab. I have gotten the URL to write correctly with the hash but the tab doesn't activate. I see a lot of discussion on how to do this in the other foundation frameworks but there is zero info on this for Foundation For Apps.

Set Custom Design for frontend Module Page in Magento

I have a custom module in the Magento installation, I am displaying the details of the specific module in the frontend under the URL, www.domain.com/modulename. Now I have two designs one for cms pages and other for the checkout and catalog pages. I want this custom module page in the frontend to be displayed in the CMS page theme but my default template set in the backend is other one.
Is there any possible way available to set the custom design for this frontend module page like we do for the cms pages under the design tab.
Please help. Thanks in Advance.
If you have your own custom module (extension), then you can control the display of it's pages via module controllers. That includes the package/theme configuration. Here is a function code that can be used to control your module package and theme selection.
public function myAction()
{
Mage::getSingleton('core/design_package')
->setPackageName("myPackage")
->setTheme("myTheme");
$this->loadLayout();
$this->renderLayout();
}
That's the only way at the moment of specifically setting custom package/theme for your action-controller-module.

Integrate existing blog code into Django-CMS?

If I already have a blog app done with Django and I want to use it with my new Django CMS site, is it okay to simply drop it into my new Django CMS project as a decoupled app and match anything /blog/ to the blog app as apposed to a Django CMS plugin? I guess what I need to know is when is it best to write my Django app as a plugin vs an entire app?
Thx
JeffC
Yes, but you don't just drop it into the urls.py, instead you can write an AppHook to tie your blog's URL scheme to a particular page in your CMS.
Plugins on the other hand are useful if you want to inserts particular aspects of you app into other page's placeholders - for example to show your latest 3 posts on the frontpage.
You might also want to include your blog's paths in a breadcrumb or menu on your site - in that case you need to write a custom Menu too.
Finally, it might also be useful to make use of django cms's placeholders in you blog model. His would allow you to post a variety of content via plugins.