How can be changed a documenttype layout in Hippo CMS - hippocms

I created a hippo documenttype using a one column layout. For rendering purposes I would like to reorganize the given items into a two-columns layout.
However, no option is available to do this change, at least not by using the latest hippo cms community version.
I have already searched in google and found following information, saying that it may be possible to change the layout by using the console, but no information about how:
http://hippo.2275632.n2.nabble.com/How-to-delete-or-rename-document-types-td7579269.html
I would appreciate any hints about it.

AFAIK there is no documentation on how to do this: this is not very complicated but this is a tedious process. If you still can - for instance your document type is not used yet - I would advise to simply drop it and recreate the content type. That being said, here is how it works:
look into your project namespace in the console: the path is something like this: /hippo:namespaces/YOURPROJECT/document-type/editor:templates/_default_/root
the root nodes defines the layout. Check out the plugin.class: for a one column this will be org.hippoecm.frontend.service.render.ListViewPlugin and for a 2 column layout the plugin.class will be org.hippoecm.frontend.editor.layout.TwoColumn
for every field in your document type (that's the tedious part) you will need to define if the field placed on the right or the left.
this is configured on the node with the name of the field path, as a property wicket.id that for instance have the value ${cluster.id}.left.item. This means the item will be placed on the left side.
Your best bet is to create a 2 column example document type and look carefully at its configuration and replicate the changes in your existing field.

Have you tried the instructions on the link below ?
http://www.onehippo.org/library/concepts/document-types/custom-editor-layout.html

Related

Custom odoo module - how to make a table

I am creating a custom module with additional part numbers on a separate tab in the products screen. I have built the module, but am having trouble figuring out how to display the information so it matches the layout in the attached image. I have tried tree view but have not been able to get the fields on the same line. Can this only be accomplished through css or is there a table view that I am not aware of?
I also need to make sure that all of the information in row 1 stays tethered together for additional forms, etc. My plan is to make the field names for each row end with a different number (i.e. x_mfrname1,x_mfrpn1,x_mfrname2,x_mfrpn2, etc.). Can somebody please just tell me if I am on the right track. This is the initial Odoo setup for a client of mine and I don't want them to come back to me down the line and find out I forgot something. I have been scouring the internet and reading a few books but I am not completely confident.
Here is a link to a layout of what I am talking about:
MFG Part Number Tab
Thanks!
class sub_part_details(models.Model)
_name='sub.part.detail'
primary_pn=fields.Boolean('Primary P/N')
obsolete=fields.Boolean('Obsolete')
pn=fields.Char('P/N')
desc=fields.Char('Description')
upgrade=fields.Char('Upgrade')
part_detail_id=fields.Many2one('part.details')
class part_details(models.Model)
_name='part.details'
cat=fields.Char('CAT')
sub_ass=fields.Char('Subassembly')
main_ass=fields.Char('Main Assembly')
notes=fields.Text('Notes')
sub_details_ids=fields.One2Many(''sub.part.detail','part_detail_id')
It might be helpful

Flag module - link's position change (Drupal)

I've just installed Flags module and it looks awful when on the bottom I see "Flag this item" link. The only thing I've found in configuration is enabling it to show as normal link. Still I haven't found how to change position of this link. Is it even possible to change link's place? I have installed CCK Blocks but it doesn't give me any option to get rid of it. If someone know or suspect what's possible - please help me.
Try the Display Suite module, this module is integrated with many modules like flag, title etc...
Display Suite allows you to take full control over how your content is displayed using a drag and drop interface. Arrange your
nodes, views, comments, user data etc. the way you want without having
to work your way through dozens of template files. A predefined list
of layouts (D7 only) is available for even more drag and drop fun!
https://drupal.org/project/ds
You can move and generate custom layouts for the fields/properties on the entity display formatter: teaser, full...

Lucene SearchResult.Fields collection is missing some properties

I have asked the following question at the Our Umbraco community site also, but I've had no luck there so far.
I've got a task where I need to manually add database records for a media image file, which is to appear in an Umbraco site for our client.
My SQL consists of:
Adding a record in umbracoNode for the image.
Adding a record in cmsContent
Adding a record in cmsContentXml
Adding records to cmsPropertyData for the image's umbracoFile, umbracoWidth, umbracoHeight, umbracoBytes, umbracoExtension
After executing the above, and logging into Umbraco, I can see the image in the Media area and all looks fine.
The problem is the call the #Model.MediaById() (in a Razor file) when I want to display that image - basically no image is displayed since the img 'src' attribute is not set.
I've stepped through the Umbraco code and found the problem. Basically when the code uses Lucene to search for the media (ExaminedBackendMedia.GetUmbracoMedia()), it does find the image file, however there are a number of fields missing for the SearchResult. For example, none of the "umbraco*" properties adde to cmsPropertyData appear in the fields collection. When I step through the code for another image (one that was added manually) I can see an extra 5 or so properties in the fields collection - including all the "umbraco*" properties.
So I can see that I have missing data here. Basically the SearchResult object is missing some fields. Can someone suggest what I may have missed please? Why is Lucene not picking up the "umbraco*" properties that I've added via SQL scripts?
You need to make sure that you republish the nodes, which will take them from the database entries that you created and put them into the XML cache that umbraco actually uses when serving up data.

Extend Page Property with custom controls in Sharepoint

Sharepoint is quite limited when it comes to multi-Lookups because it saves that information in strings. So I changed the Page-Property
"Elements (MultiLookup-> elementIds" on the propertyPage
to an inserted List "PageElements":
"
(SingleLookup)pageId , (singleLookup) elementId"
Because this is quite hard to maintain for my content admins I want that they can enter that information in the page properties like before instead of adding lines into "PageElements"
Therefore I want to add a control that handles that.
I do not need a solution for the task how to achieve that specific function, but a general hint how to add any custom control into a Page property.
I starting point link would be very nice. I just doen't seem to find the right words to feed google with my topic.
Solved this by using a custom field type with that logic. Basicly Described here: http://avinashkt.blogspot.de/2011/07/creating-custom-field-in-sharepoint.html

yii-user extension - how to add a checkbox profile field?

Yii framework, yii-user extension (using latest version of both, to date): how do I add a simple "checkbox" field for the profile of all users?
I am logged in as admin, and went to user/profileField/admin. I can add new field but the closest I get to is adding a "BOOL" field which is rendered as a dropdown, while I need a checkbox... . When "BOOL" is used I cannot specify the widget and even if I could, there's no documentation on those yii-user widgets.
Any help is welcome!
Open up modules/yii-user/views/user/registration.php. Around line 40, add something like this:
else if ($field->field_type=='BINARY') echo $form->checkBox($profile,$field->varname,array());
Now when you want to create a checkbox field, choose the BINARY field type. If you want to require that it's checked, add this to the 'Other Validator' field: {"compare":{"compareValue":"1"}}
I've had a look around the docs for that extension and I don't actually see a single checkbox anywhere in the screen shots or mentioned anywhere in the wiki either.
You might be able to dive in and add support for one in the places you need it, Yii nicely handles all the HTML elements so it shouldn't be too hard to add the feature in a primitive form. CHtml::checkBox() or CHtml::checkBoxList().
Then again if your already running into problems with it, it's probably going to be easier in the long run for you to write what you need yourself.