How to set different Layouts in Croogo - croogo

I try to use different layout for different pages in croogo, But I have a problem. For example. I want to have 2 layouts: default and my_custome. default is for page1, my_custome is for Page2. How to achieve this ? Is any Plugins available ? please do help me if you know the solutions.?

Croogo has fallbacks for its Nodes: http://wiki.croogo.org/1.3/designers/themes/fallback-system
From the custom view file, you can try setting $this->layout = 'whatever';.

Related

How to configure multiple Material UI badges for the same content

I have a design requirement to add multiple badges to a single piece of content. It doesn't seem to be a support use case in the docs. Has anyone implemented something like this? How should I approach this?
You can easily create a second badge the same way you would for the first badge.
Below is an example where the given content has two badges in different locations.
<materialDesign:Badged x:Name="ErrorBadge" BadgePlacementMode="TopRight">
<materialDesign:Badged x:Name="WarningBadge" BadgePlacementMode="Right">
// Content
</materialDesign:Badged>
</materialDesign:Badged>

not able to register two plugins of touch-ui rte dialog

I am using the steps given in the URL to make a color-picker rte plugin
http://experience-aem.blogspot.in/2015/01/aem-6-sp1-touchui-richtext-editor-color-picker-plugin.html
and at the same time I am making another custom rte plugin to do some text modulation.
But only one of them is working using rte.coralui2 as categories.
and both icons are coming at the same location.
If I disable one js then another is working.
I have registered the plugin with different name and I have also used different variables.
I am not able to make the rte plugin button at different location.
Please suggest the possible solution.
it's possible you are overlaying rather than extending the rte.coralui2 category. I suspect your custom clientLibs are competing with each other and only one is available.
It seems like you are using the same steps provided in the blogpost for creating both the plugins and while doing that, you are using the below code twice with different icons :
if(items.indexOf(ExperienceAEM.TCP_UI_SETTING) == -1){
items.splice(3, 0, ExperienceAEM.TCP_UI_SETTING);
}
So, maybe, the icons are being added at the same place and only one of them is shown.
You should create ExperienceAEM.CuiToolbarBuilder Class only once and add both icons inside that class

Remove navigation menu item for model without removing ability to manage in RailsAdmin and CanCan?

So I have a model (Image) that belongs to another model (Product), and I want to allow a user to manage both of these two types of models, but I don't want to list the model in the navigation menu in RailsAdmin.
Basically of these two I only want Product to be visible in the navigation menu, while allowing the user to still crud their images within the edit/add form of a Product.
Is this possible with CanCan? Or do I need to use CSS to hide these navigation items?
config.model Team do
visible false
end
According to this issue, and this issue your only valid approach would be the CSS approach
I had the same issue, and unfortunately I haven't found any proper solution. The only workaround was to hack Rails Admin using javascript.
So, to hide the model Image from the navigation menu I added this code in 'app/assets/javascripts/rails_admin/custom/ui.js':
$(document).on('rails_admin.dom_ready', function() {
$('ul.nav-pills li[data-model="image"]').hide();
});
I had same issue. fixed using this css
li[data-model="event_date"] {
display:none !important;
}
in your model:
rails_admin do
visible false
end
no need to edit your rails_admin.rb file.

Change variable in Layout from view script

in my layout i have things like meta tags etc. that may change in e.g. in different static sites.
Example:
if i go to
/static/about
i would like to have a different meta-description as in
/static/contact
My Problem is that i would like to change these variables/values inside the view script static/content/about or static/content/contact and NOT in the controller.
How can i do that?
Take a look at the view helper: PlaceHolders
Take a look at this post may it useful for u :
http://blog.ggshow.com/index.php/reference/zend-framework-view-helper-placeholder

Zend Framework: Hide navigation item in menu by show in breadcrumbs

i am using Zend_Navigation i want to show the nav item in the breadcrumbs but hide it in my menu, how can i do that?
There are many choices, e.g.
You may set visible parameter to false (eg. in xml config file), then use setRenderInvisible(true/false) on the navigation helper,
You may use separate containers,
You may modify the container on the fly (getContainer(), getItemBy()…)
When using an XML config file, use an integer instead of a boolean value:
<visible>0</visible>
An issue has already been logged for this problem here.