I tried to translate the Content Fragment content but that content is not sent for translation.
Let's take an example, suppose, we have a Content fragment model, named "Press Release" and there are 2 fields "title" and "description". Once we create a content fragment based on the "Press Release" model and Create a Translation project then content fragment fields are not going for translation,
I am using AEM 6.5.12.0 version,
I tried to add some translation rules but that also does not help, I am sure there are some issues with writing a Translation rule for translating against the Content Fragment Model.
Can anyone please help me with this?
First did you create the target language folder in the assets? it is necessary for AEM to know where it needs to create the target.
Assets language structure
How do you add translation rules?
for title and description the properties in translation config UI should be: jcr:title and jcr:description
Translation config UI
Check this file in the CRXde /conf/global/settings/translation/rules/translation_rules.xml that:
is at after
you have those 2 properties under content/dam
hope it will help
Seb
Related
I am working on making one of the AEM website of my client accessible. For the same, I want "aria-label" attribute should be added(value can be provided in authoring dialogue) to the anchor tag, when the target selected is "New tab".
Could not find much around it, following link describes we can customize the rtePlugin/linkPicker. But could not figure out my problem. Any help/guidance
http://experience-aem.blogspot.com/2017/06/aem-63-touch-ui-rte-rich-text-editor-color-picker-plugin-inplace-dialog-edit.html
Option 1) Reuse Alt Text/title from otb anchor link. No need to customize dialog. When Alt Text is authored otb will populate title like this <a title="Google" href="htttps://www.google.com">Google Link</a>
,
You will then need to Write a Link Transformer to copy title into aria-label. The rewriter will look for anchor tags; if title is present, copy into a new attribute aria-label and rewrite the anchor. If link rewriter is difficult, you can also rewrite the rte text from a sling model while saving the RTE text. Use a Jsoup parser to parse HTML, rewrite by copying title to aria-label and write back into JCR.
Option 2) Adding new text box for aria-label to dialog. You can refer to this blog post. But this option is needed only when Alt text is different from aria-label which I wonder why. Usually aria-label and titles are same and option 1 above will suffice.
So Finally was able to add aria-label attribute with some troubleshooting. Moreover the steps in the links mentioned above are same. Want to add additional details which I faced issue with
Adding new field
Follow the steps mentioned in the blog
After adding the field as mentioned in the blog the newly added attribute will get filtered by AEM. You will see the following error in error.log file
Error : "26.09.2017 12:40:42.804 INFO [0:0:0:0:0:0:0:1 [1506447642680] GET /content/we-retail/language-masters/en.html HTTP/1.1] org.apache.sling.xss.impl.HtmlToHtmlContentContext AntiSamy warning: The a tag contained an attribute that we could not process. The rel attribute had a value of "bookmark". This value could not be accepted for security reasons. We have chosen to remove this attribute from the tag and leave everything else in place so that we could process the input."
Solution: Declare the attribute in the AntiSamy configuration file in CRXDE Light.
Note : make the following changes in /apps/cq/xssprotection/config.xml (overlaying /libs/cq/xssprotection/config.xml), for Sightly/HTL its /libs/sling/xss/config.xml
Copy /libs/cq/xssprotection/config.xml to /apps/cq/xssprotection/config.xml.
Open /apps/cq/xssprotection/config.xml.
In the common-attributes section, add the following target attribute declaration.
<attribute name="aria-label>
<regexp-list>
<regexp value="[a-zA-Z0-9-_\$]+" />
</regexp-list>
</attribute>
Find the tag declaration by searching the term <tag name="a".
Add the line below in the list of attributes:
<attribute name="aria-label" />
Save the file. Now, the link will open in a new window if the option is selected.
I have to implement a media download feature. The backend user should be able to upload a media file, set the title, description, release date and so on... The result should then be visible and the file available for download in the frontend.
I am not sure what is the best way to achieve this: Plugin or Custom content element ?
Whats the main difference between the two and what would be the best solution for my task ?
Plugins are used for more complex rendering of records with different views (for example a list and a detail view of records stored somewhere in a storage folder). A custom content element (CE) should be preferred if all relevant data is stored in the record.
For your case, a Content Element seems to be the right solution. This kind of custom content elements can also be easily created with helpful extensions like "mask" which may takes you 10 minutes to create a custom CE.
https://typo3.org/extensions/repository/view/mask
If I understood you properly.
You can define plugin as type of "list_type", or as "CType" (if you need to code specific function, which is hard or unable to achieve using eg. Fluid contents) or even as another menu type defined as "menu_type".
These all types can be the same way made plugin, this separation for types are basically only for making it appear in different selectors. So:
your plugin defined as menu_type is to be selected in "Special Menus" content type in "Menu type" selector,
defined as list_type (so called) is to be selected in "Insert Plugin" content in "Selected plugin" selector,
defined as CType is totally new content type.
But they work the same way and this is easily to be switched using parameter in ext_tables plugin register call:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( ['Label', $_EXTKEY.'_myPluginSuffix'], 'CType');
1) You can use the "File Link" content element and adapt its TypoScript (tt_content.uploads.20.renderObj) to your needs.
2) You can use the file_list extension and adapt its Fluid templates to your needs
So, I'm new to TYPO3. I worked myself through some guides and documentations to be able to create custom content elements on my own.
Now, for one of my desired content elements, I need to have a set of fields I want to be able to make repeatable, since I want to leave the choice up to the editor, how many of the sets he wants to add.
I'm running on TYPO3 version 7.6
I have already seen both options in existing content elements:
Content elements that work like a wrapper where you can add additional content elements within and
Content elements where you can add fieldsets within its configuration.
I'm searching for examples or written guides to recreate this, since I can't figure it out from the source code of those examples I've seen.
Edit(27.12.16):
So after seeing a few reactions and replies, I want to further clarify what I'm looking for.
I do NOT need an assistant plugin to create new content elements, I'm already past that.
Let me draw an example, to better describe what I want to achieve.
I do already have a working Content Element.
I have defined a set of fields (for example name & phone) shown in the TYPO3 backend. Now I want to leave the choice to the editor, if he just wants one set of 'name & phone' fields, or 2, or 8.
Therefore I want to create a '+'-button or something like that, for the editor to click on to make a new input set of 'name & phone'-inputs.
There is an extension called mask, with that you can simply click together your own content element with many different kinds of relations and fields.
Then there is a second extension mask_export that exports your new content elements into an own extension.
With those you can just create a very basic content element
export it
see what code was generated
add more to your content element
export it
check the code
and so on :-)
im working with Claus' Fluid Powered TYPO3 and I'm quiet happy with it. At the moment I have to implement a template wich should contain another extension (e.g. news) in the sidebar.
What is the preferred way to implement this.
My idea was to add the f:cObject ViewHelper and insert the extension in that way.
Is this the correct approach?
Thx
Markus
This depends on the type of template you are building:
Page templates should have proper content areas into which you can insert content. If the content needs to be shared, you have a few options: a) create the element in a sys folder and reference it from your Flux form settings then use v:content.render to render it by UID. b) Place any number of shared elements in a sys folder and render all by PID. c) Use content sliding in a column in your template which is there in all templates and is designed to contain elements which "slide" to every subpage (and can also be edited on subpages if editor has access).
Content templates can use flux:grid with flux:form.column, or flux:form.content as a shortcut to quickly make a single column, to add a content area, then flux:content.render to render those elements. This allows you to control that gets rendered around the plugin.
Plugin templates can associate a Flux form and use the steps described in point 2.
I think you're looking for 1a) or 1c) in this case.
Yeah. As the title says, I am tasked with creating custom field in user profile, and sort of hit a wall on this one. It is a very small customisation, add a yearly_target field to user edit and detail view.
I was happy to stumble on this article to add a custom field in sugar.
Although it's a huge help, it seems to be missing one or 2 minor points.
To have the fields show in edit and detail views, one apparently needs to create and edits EditView.php and EditView.tpl and DetailView.php and DetailView.tpl, except I am not too sure where these files go. The yearly target field shows up in user list view, but not in edit/detail views. I tried custom/modules/Users , custom/modules/Users/ext , but changes made in the templates (static html changes) have no effect.
Anyone know where these files should go?
Thanks SO'ers!
They should go in the custom/modules/Users/ directory. Do make sure you change the references inside the EditView.php and DetailView.php files to reference the templates you have in the custom/modules/Users/ directory instead of the default ones in the modules/Users/ directory.