How to know content type of an item stored in alfresco repository? - content-management-system

I have a number of custom content types created in alfresco repository & I am uploading a number of items in alfresco of these types.
After uploading I want to determine content type such as cm:content or lj:doc or lj:invoice etc. of an item in alfresco. I tried with ContentService & DictionaryService but not helpful.
How can i do it?
Regards.

use the nodeService:
nodeService.getType(NodeRef nodeRef) returns QName

For more infos about the content type, you could use content.mimetype too !

Related

Columns Layout export

Sparx Enterprise Architect offers the possibility to define custom layouts for list views in the package browser and to save these definitions. When exporting a Project file (*.eap) via xmi, these definitions are not included in the export-file and thus lost. I wonder whether there exists a way to transfer columns layout definitions between two EA-Projects.
Many thanks in advance for every hint!
As Geert suggested the layout is stored in the registry.
[HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS]
holds a key PKG_BRWSE_LAYOUTS with the comma separated list of profile names (so you better don't use comma in your profile name ;-).
The detailed information is stored in
[HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\EA1200Workspace\BCGPGrids\EA_ELEMENT_LIST_<name>BCGPGrid-0]
where <name> is the according profile name.
For a sample layout here they looked like
"Columns"=hex:11,00,01,00,00,00,01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,01,00,00,00,01,00,00,00,01,00,00,00,01,00,00,00
"ColumnWidth"=hex:11,00,16,00,00,00,04,01,00,00,50,00,00,00,50,00,00,00,50,00,\
00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,\
00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00
"ColumnOrder"=hex:08,00,00,00,00,00,01,00,00,00,06,00,00,00,02,00,00,00,0d,00,\
00,00,0e,00,00,00,0f,00,00,00,10,00,00,00
"Groupping"=hex:00,00
"LastFieldChooserPos"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"IsFieldChooserVisible"=dword:00000000
"IsFieldChooserThemed"=dword:00000001
"SortColumns"=hex:00,00
I have to leave that to you to decipher the coding used here. But for a pure ex-/import you probably don't need to do that.

Integrate ${Category.displayName} in Demandware content slot

There is way to show ${Category.displayName} in regular Demandware Content Slot? Please let me know if there are other options how I can show actual category name inside a content asset.
Thanks in advance for your help.
Assuming this is a Category type content slot configuration you can access the categories you configured via ${slotcontent.content} which is an iterator of categories (you can use only the first element in your use case and ignore if there is more than one category).

how to filter asset and meta-data property values using query builder in aem

type:nt:unstructured
path=/content/dam/en_us
node=jcr:content
group.1_property=Cmg_name
group.1_property.operation=exists
group.1_property.value=Web Standard
I have assets like pdf and images inside \content\dam\en-us and also i have meta data for respective assets .i want to get pdf or image by asset metadata property values .but i am notable to get exact output.I have asset c012666.png inside jcr:cotent inside metadata.now, if give property value i have to get that pdf file.so, pls can any one help???
if you want to list the properties of a hit you have to use p.hits = full. And if you want to list all it's children you have to use the p.nodedepth = AMOUNT_OF_SUBLEVELS.
For example the query http://localhost:4502/bin/querybuilder.json?p.hits=full&property=jcr%3atitle&property.value=Default%20Design&p.nodedepth=2
will list the properties of the the node called "Default design" and also list the children of it
Hope that this suits your needs
Here's some documentations https://hashimkhan.in/2015/12/02/query-builder/

sightly ( ACS - Commons) generic list

I am new to AEM.
I have used ACS commons generic list for populating the drop down values. I have added the titles for french and english under localisation part of generic list for each item.consider my js(js based approach in sightly) would return itemList (for ex: var itemList = list.getItems();).
how can I get the locale based title available in generic list(for ex, how can i get the french title which i have included under localisation part), in place of ${list.title} mentioned in the below HTML code:
<select data-sly-use.frm="sample_form.js" data-sly-list.list="${frm}">
<option value="${list.value}">${list.title}
OR what is the other possibility to get the locale based title available in generic list with the help of sightly.
Could anyone help me on this. Thanks in advance :-)
Using JS API you can create custom Arrays that then can be used by the data-sly-list in order to traverse through all the information. I have done this successfully and I like the flexibility and separation of responsibilities.

How to fusion two content elements? / Does an all in one content element exist?

I need a content element that cointains apsects from the "Textpic" and the "Media" content elements.
Basically I need the whole palette of input masks of the textpic CE (headline, rte text, images) plus the media tab (swf, mp4, mov) from the media content element.
This special requirements for our project comes from the need that we can only use one content element for our specific javascript content slieder. So I can not use like a Textpic and underneath a media CE. No it really has to be just one CE which can handle the textpic + the media CE stuff.
Generally I ask you: Is there already a extension, trick, modification or a framework which I can/should be use to achive that i can "fusionate" content elements? Like an "all-in-one"-content element, a multi content element?
Ps: I do not use Templavoila. My Typo3 version is 4.5
I think this is the tutorial you're looking for:
http://castironcoding.com/resources/our-blog/sp/view/single/post/reason-6-for-choosing-typo3-custom-content-elements-and-extbase-again-part-23.html
Follow step 2 and 3.
You'll also need to add a specific rendering config in Typoscript ie: tt_content._your-ce_
But it can be copied from out of tt_content.textpic and tt_content.media. You can find the expample typoscript of before mentioned CE's in: typo3/sysext/css_styled_content/static/setup.txt. Just don't alter it there, but make a copy and alter in your own file.
As you seem to only talk about reusing already exisiting fields, you really only need to change the backend interface (big keyword: "showitem"). You'll need the database names of the fields (peek into the tt_content table of some records where you know the contents), alternatively visit the module Admin Tools / Configuration, select TCA in top dropdown menu, open tt_content and columns.
Try http://blog.chandanweb.com/typo3/adding-new-fields-to-existing-typo3-tables-at-desired-location, you'll of course have to substitue tt_content for tt_news etc.
You might also want to make a new type (the above recipe is for changing a preexisitent), but I'm sorry, I'm currently out of time for explaining that. It's not very hard, though, and the castiron link by Koopa will help you on your way.
Perhaps you can wrap the content column in another div? You can use that outer div for your content slider. Now you actually use all content elements seperately, but combine then for usage.