I'm currently developing a custom search in Alfresco for some custom aspects that I've created . Can you direct me to the correct xml file which I need to edit to add my custom aspects in the search? I have researched numerous posts on the web but I couldn't find anything...
Explain better,
do you mean the default advanced search in Alfresco Explorer?
In that case, you should search for a file named web-client-config-custom.xml.sample inside:
/Alfresco/tomcat/shared/classes/alfresco/extension
or
/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension
Then rename the file removing the sample extension, to have web-client-config-custom.xml and copy the file inside the first path above (the "shared" one, not the webapps/alfresco one);
Then, inside, search for a tag named "config evaluator" Advanced Search, it should be something like this:
<!-- Example of configuring advanced search -->
<!--
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
</content-types>
<custom-properties>
<meta-data aspect="app:simpleworkflow" property="app:approveStep" />
</custom-properties>
</advanced-search>
</config>
-->
There, you can add your custom aspects that you created in your customModel.xml file.
To extend the custom advanced search capabilities, you could add some custom content type search or properties that are not part of the aspects, like this:
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="myNamespace:customType" />
</content-types>
<custom-properties>
<meta-data type="myNamespace:customType" property="myNamespace:customTypeProperty" />
<meta-data aspect="myNamespace:customAspect" property="myNamespace:customAspectProperty" />
</custom-properties>
</advanced-search>
</config>
hope it helps..
Related
I want to create Two different create folder options in alfresco menu create menu with my custom types.
can anyone help me, how can i achieve this.
Thanks in advance.
Alfresco Version
5.0.d
In share-config-custom.xml type following:
<config evaluator="string-compare" condition="DocumentLibrary">
<create-content>
<content id="newFOlderId" mimetype="text/plain" label="newLabel" itemid="cm:folder" icon=""/>
</create-content>
</config>
itemid - use your custom type
I would like to change the link in the Plone logo viewlet. By default it points to the Plone site root, I want to point it to a location that is not within the Plone site.
I tried writing a custom logo viewlet, but this seems very complex for such a small change. What is the best way to do this?
The easiest way to change the Logo link is to override the logo viewlet template. This is best done with z3c.jbot.
You need to add z3c.jbot to your projects custom product, by adding it as a dependency in setup.py, and also set up the configure.zcml correctly:
<include package="z3c.jbot" file="meta.zcml" />
<browser:jbot
directory="templates" />
Don't forget to make sure you have the browser prefix added in the <zcml> tag.
You can now copy the logo.pt file from plone.app.layout to the templates directory in your custom product. Rename the file to plone.app.layout.viewlets.logo.pt and change:
tal:attributes="href view/navigation_root_url;
title view/navigation_root_title"
To:
href="http://stackoverflow.com"
Restart the server, and the logo link has now changed.
Alternatively you can edit it via ZMI (/manage) in portal_view_customizations. And search for the "plone.logo" view.
It should open this url in the frame:
/portal_view_customizations/zope.interface.interface-plone.logo/pt_editForm
I have a layout.xml file that triggers and runs properly, but my css does not seem to work.
...
<my_handle_name>
<reference name="head">
<action method="addCss">
<stylesheet>css/mystyles.css</stylesheet>
</action>
</reference>
</my_handle_name>
...
EDIT
I have a folder structure something like this,
magento->skin->frontend->enterprise->myfolder->css->mystyles.css
and it appears that magento is looking in
magento->skin->frontend->default->default->css->mystyles.css
how can I edit the layout.xml to go to this directory?
if your other setting is working perfect then you have to set your package name and your myfolder in back end for default configuration if you don't have any store, i assume you have only one default store
then go to this step in Admin
System -> Configuration -> design then set your package name instead of default and also set your theme name instead of default theme
Below is the detail link you can get more idea from it
Custom theme assets belong under the base/default theme. Based on your layout XML, your custom CSS file belongs in skin/frontend/base/default/css/mystyles.css.
Convention is to put your file in a namespaced subfolder to prevent potential collisions with end user files.
I notice that if I make a page and add and upload an image to include in it, by default it is included in the site navigation. How can I stop this from happening automatically?
Option 1
There is a Plone setting which tells which types are included in the navigation. Go to ZMI > portal_propeties > navtree_properties > metaTypesNotToList and add Image there.
Option 2
For each image, toggle checkbox "Exclude in navigation" on Image's Settings tab.
if you need to do so on a container basis, you could use the content rule included in sc.contentrules.metadata.
just add it to your buidout and configure it manually to set the ExcludeFromNav field to True.
an alternate way to do so is to include a contentrules.xml in your project profile with something like this:
<?xml version="1.0"?>
<contentrules purge="True">
<rule name="exclude-on-add" title="Images are excluded from navigation when added"
description="" enabled="True"
event="zope.lifecycleevent.interfaces.IObjectAddedEvent"
stop-after="False">
<conditions>
<condition type="plone.conditions.PortalType">
<property name="check_types">
<element>Image</element>
</property>
</condition>
</conditions>
<actions>
<action type="sc.contentrules.actions.ExcludeFromNav">
<property name="exclude">True</property>
</action>
</actions>
</rule>
<assignment name="exclude-on-add" bubbles="True" enabled="True" location="/your-container"/>
</contentrules>
You have the options for Navigationin the Site Setup menu.
Remove the tick on image for displayed content types and images are not longer shown on site navigation and site maps.
We have a "component A" , which has a multivalue field of type 'embedded field'.
The embedded field in turn has a multivalue field of type 'Component Link'.
This looks like:
Component A -> Embedded Shcema Fields -> Component Links
How to iterate and access the fields of 'Component Links'in dreamweaver?
Also the component field supports three different schemas and We want to check on these schema names in dreamweaver.
I found this post useful. But more details would be indeed great.
Have a look at these questions:
How to handle nested repeating regions in Dreamweaver TBBs in SDL Tridion 2011 SP1
Retrieving values of a linked component in Dreamweaver TBB - and making it SiteEditable
And this page from the Tridion practice cookbook:
http://code.google.com/p/tridion-practice/wiki/IteratingOverMultivalueEmbeddedFields
They cover the most common problems you may have with accessing fields in a DWT.
If these don't answer your question, update your question with:
the relevant XML fragment of your Component
the DWT fragment showing what you already tried
You can easily iterate through component link of multi value embedded field but there is no direct way to get component link values, you have to use either dwt extension, or .net tbb. There are some available on sdltridionworld.com.
I did this earlier with nested template. You may also try nested/sub template from your main dwt tbb based on schema of component link field component in the loop.
Also I would suggest to use razor templates.
You can iterate through the multi-value field paragraph in the embedded schema field paragraphs as follows:
<!-- TemplateBeginRepeat name="Component.Fields.paragraphs" -->
<h2>##Field.header## (##TemplateRepeatIndex##)</h2>
<!-- TemplateBeginRepeat name="Field.paragraph" -->
<p>##Field##</p>
<!-- TemplateEndRepeat -->
<!-- TemplateEndRepeat -->
As Vikas previously mentioned, repeating over the multivalued component link field of a multivalued embedded schema field is relatively simple. Your DWT code should follow this form:
<!-- TemplateBeginRepeat name="XML Name of Embedded Schema Fields" -->
<!-- TemplateBeginRepeat name="XML Name of multivalued Component Link field" -->
##Field## - Should write out the TCM ID of your linked component
<!-- TemplateEndRepeat -->
<!-- TemplateEndRepeat -->
You can not, however, access the fields or schema details of these components with "out of the box" Dreamweaver Templates.
You can:
install the Dreamweaver Get eXtension on your Content Manager server, which will allow you to retrieve fields of linked components (amongst other things) using the ##Get(...)## syntax
Use the "Get Linked Components" .Net TBB from the Generic SDL Tridion 2011 Template Building Blocks before your Dreamweaver Template, which will place the linked components into the templating package so that you can iterate over them directly
Write your own .Net TBB to handle your specific business logic related to these links and output html (not recommended) or a named package item, items or array of items that you can handle from your DWT.
Call another (nested) component template from your DWT with ##RenderComponentPresentation(Field, "tcm:x-xx-32")##
Any combination of the above
Please try using below code:
<!-- TemplateBeginRepeat name="paragraphs" -->
<!-- TemplateBeginRepeat name="Internal_Link" -->
<!-- TemplateBeginIf cond = "Internal_Link != ''" -->
<p> ##Component.ID## </p>
<!-- TemplateEndIf -->
<!-- TemplateEndRepeat -->
<!-- TemplateEndRepeat -->
To check for zeroth component you can use below code:
<!-- TemplateBeginRepeat name="paragraphs0.Internal_Link" -->