Hi may i know how to customize the Cakephp interface layout? I would like my cake app layout to at least look something like this http://chocotemplates.com/preview/gui/spring-time/#
1) how to remove the left action button?
2) how to add the tab button at the header page?
3) Add margin * auto to make the site have left and right margin and make the body centered.
I have tried to change and i could not find the necessary file which allow me to edit these simple things above. Please advice.
My boring app print screen
CakePhp is a framework, not a CMS =)
you have probably used the bake function to create the Views, well first you'll need to redefine the layout so you could add the css/js files you'll need (in "/views/layouts").. and also to define the id's and class names of your elements.
so basically all you need to do is to modify your html/css manually in the views (.ctp files inside the /views folder).
But maybe you want to redefine the way that cake create the views when baking. Maybe there are some good samaritans on the internet that share their templates with the world.
Hope this helps =)
a) change the layout
/views/layouts/default.ctp
b) use custom templates for the views:
http://www.dereuromark.de/tag/custom-template/
you can change just about anything.
Related
I have a Snippet model that I'm using ModelAdmin to create, edit, and list in Wagtail. I'd like to create a copy function, and I can see that wagtail supports this out of the box for Page objects:
Before I write custom code to do this, I thought I'd ask if there is any way to easily do this within Wagtail. I didn't find any hooks that would even easily allow adding more buttons, and while I did find modeladmin-list-display-add-buttons, it seems to only allow me to change the placement of the default edit and delete buttons.
It is possible to achieve this. However, it will require custom code, and various overrides and additions in different places. Here are some steps that should help you on your way, with some links to some example code in the wagtailmenus extension, which does this exact thing:
Adding the custom view:
Create a custom CopyView view (subclassing wagtail.contrib.modeladmin.views.EditView will probably be your best starting point). For inspiration, you might want to take a look at one I created for wagtailmenus: https://github.com/rkhleics/wagtailmenus/blob/master/wagtailmenus/views.py#L141
Integrate the view with your ModelAdmin class, by adding a copy_view() method that instantiates your custom view. For example:
https://github.com/rkhleics/wagtailmenus/blob/master/wagtailmenus/modeladmin.py#L78
Override your ModelAdmin class's get_admin_urls_for_registration() method, to make the view accessible via a URL. For example: https://github.com/rkhleics/wagtailmenus/blob/master/wagtailmenus/modeladmin.py#L82
Getting the button to show in the listing:
Create a custom ButtonHelper class by subclassing wagtail.contrib.modeladmin.helpers.ButtonHelper.
Add a copy_button() method to it, that can provide all of the necessary details to create the button. For example: https://github.com/rkhleics/wagtailmenus/blob/master/wagtailmenus/modeladmin.py#L38/
Override the get_buttons_for_obj() method to output the copy button in the listing along with the others, depending on the user's permissions (e.g. https://github.com/rkhleics/wagtailmenus/blob/master/wagtailmenus/modeladmin.py#L49)
Finally, get your ModelAdmin class to use your custom ButtonHelper instead of the default one, by changing the button_helper_class attribute to reference your custom class.
If you'd like to understand more about all of the various classes within wagtail.contrib.modeladmin, I'd suggest reading the modeladmin customisation primer page from the official Wagtail documentation.
I use the bartik theme in drupal7 as the default theme.And I completely override the page.tpl.php file.
design a two columns layout : the lefsidebar and the contentArea. Everything is ok except one problem.
the node's field label can not be set in the Manage display panel. And the node's body label was disappeared,and other's labels do exist but can not ,say, be set hidden ,above,inline.
I google the for solutions but bad luck no result.
Need your Help. Thanks.
I do not get the point in modifying the php file to do what you want. I think you just want to set a two-column layout, but you do not need to edit your code to do so. Have you tried the Display Suite module?
So, I'm starting out on my first Cake app, enjoying it so far and I've almost finished the first part of my app. I'm just now tidying up my code and making sure it's done the Cake way.
I know Cake like to have code in certain places, e.g. the fat model, skinny controller ethic, but how about in a layout?
I have a nav bar at the top of each page. The links are populated by the current controller and passed to the view in an array which arranges them in the nav bar.
Currently I have an ->extend in every view to pull this bar in, but that's repetition and I want to remove it.
My 2 options (I think unless there's another way)....
Code this nav bar directly in the layout. I'm not sure about doing this, not sure if you're supposed to but a lot of non-presentation code in the layout.
Or, I could create an element, have the code there and include it in the layout.
Which is the Cakeiest way of achieving this?
Hi friends i am using jdev 11g release2 (11.1.2.4.0).I want to create a registration form from dragging datas from data control and my question was how to change or move the position of textfield in that form into different areas?
You should be using various layout components to achieve the layout you want, and remember that layout components can be nested to create more complex layouts.
See some examples here:
http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/layoutForm.jspx
You can use the view source menu to see how they achieved that.
http://jdevadf.oracle.com/adf-richclient-demo/faces/feature/layoutBasics.jspx
Please be a bit more clear in your query. From what I was able to make out:
You can either use the "code view" of the JDev to move the code which represents the component to a different location or use the "Design view" to drag and move the component.
I would recommend the first approach as it makes it easier to manage the code/layout
You can change the position of the fields within the form or you can drag them out. However for this you should try out some tests and see which suits you best. I think if you surround each attribute with "Panel label and message" you will have a better view of your page.
I have a requirement which requires me to use a single dialog with two tabs. Each tab should have a CustomMultiField (multiple sets of four fields). I do not know anything about EXT JS. Can some one point me to right direction where I can find something about requirement as above.
I have built custom components without any explicit understanding of Ext JS. To understand how to set up a dialog with tabs, look at the code for the page component in /libs/foundation/component/page. A directory of all the xytpes you can use, like MultiField, is here.
If you need something that behave like one, but is not necessarily huge specific ExtJS component or custom xtype, and you do not want to dig hundreds of Adobe ‘support’ pages, trying to find some piece of useful doc.
You can simply use multifield xtype and write 4 pure JS listeners, that does what you need.