I've create a new content type and added a Media Library Picker field to it.
When the content is displayed, the "Display Name" of the media library field is also displayed.
How do I hide it?
Thanks
Solved the issue by editing the media library module view.
Edit
Thanks to #Bertrand Le Roy,
The correct way is to override the module's view in the theme's folder using Alternates and NOT change the original view in the module's folder.
Related
Added a Custom field to media elements, where do I assign values in administration view?
Can't find the field to set the value for the image object.
Expected to set it for an image object globally
Problem fixed with Version 6.4.17.0
https://issues.shopware.com/issues/NEXT-22512?products=SW-6&edition=community,professionalEdition,enterpriseEdition,shopwareRise,shopwareEvolve,shopwareBeyond&projects=all&type=1,4&status=open,inProgress,done&search=NEXT-22512
Find the file after navigating to Content > Media. Select the file and in the sidebar to the right you should find the the custom fields sets at the very bottom.
Update: As of today there is an issue with custom fields in the media module, that was already fixed but not yet released.
Here's what I'm trying to do. When a user uploads a file, i need them to make one of three options. I'll then create a transformation to link to the file, with the option they selected determining the which icon.
I started with cloning the cms.file, and then created the new field i needed for the options. I then uploaded a file using that page type. I don't see my option list (Drop-down list) on the upload screen, or after the file has been saved.
I'm been playing with the Layout but that doesn't seem to help. What am I missing here?
You could create a simple page type that has a file upload field, that would solve your issue, and also you could include your extra field or fields in your new page type.
I'm not sure we have enough information to debug why your custom page type might not be showing the field you added, but a possible workaround: depending on what you are basing the icon on, it may work to just use different icons based on the file type? Kentico even has a method you can use to get a file icon based on the extension:
<%# GetFileIcon(Eval("FileExtension")) %>
Otherwise, maybe you can include some more information about your custom page type such as a screen shot of the fields and of the form tab for that page type. Is the "icon" field you added simply not showing up in the form?
My question is simmalar to questions/10369967/orchard-cms-how-to-add-media-picker-field-to-anew-module
I've created a new content part, that has a select list, a text box and ... I want to include a media picker filed.
I have added this to the content part with Bertrand Le Roy's suggestion of:
ContentDefinitionManager.AlterPartDefinition("Product",
builder => builder.WithField("ProductImage",
fieldBuilder => fieldBuilder
.OfType("MediaPickerField")
.WithDisplayName("Product Image")));
However I've no idea of how to show this in my custom editor View
I'm sure there should be something easy like #Display(Model.ProductImage) ... but I've followed the writing a content part form the Orchard docs, and my model in my editor view is not dynamic.
So if such magic as #Display(Model.ProductImage) exists, how do I add the media picker item to my view model ?
Update
The Media picker field seems to be showing on the content types where I add this part, just not where I want it! I want to show / hide this field biased on values selected form a select list, How can I stop the default rendering of the field Content Item and Render it in my custom view ?
Update 2
I've added this in the model
public MediaPickerField MediaPicker
{
get{ return (MediaPickerField)((dynamic)ContentItem).HeaderPart.Image;}
}
this to the view
#Html.Partial("EditorTemplates/Fields/MediaPicker.Edit", Model.MediaPicker)
and this is the placement.info
<!-- MediaPicker -->
<Place Fields_MediaPicker_Edit="-"/>
Now it looks right on the editing via cms end... but dosen't seem to save the images to the database!
Should be something like #Model.ContentItem.Product.ProductImage.Url
I'd like to use custom fields to display some page specific strings in the theme.
I have created a custom field "intro" of type Textbox.
How do I access the data in the theme template (velocity)?
As there is no "introspection" which variables are declared, I find it very difficult to figure out how to access them. The documentation is far from usable on the topic of custom fields :-/
If you definde custom attribute in a page than you can use
$layout.getExpandoBridge().getAttribute("intro")
Also see javadoc or source for com.liferay.portlet.expando.model.ExpandoBridge
if you need use in template FTL, in my case for menu navigation template
<#assign prop = navItem.getLayout().getExpandoBridge().getAttribute("prop_name") >
Work for me in Liferay 7+:
Create a custom field type "site", fill data into site settings, and use into theme template for call this data into liferay theme:
If a VM file:
#set ($site_custom_field = $layout.getGroup().getExpandoBridge().getAttribute("site_custom_field_key"))
<h1>$site_custom_field</h1>
If a FTL file:
<#assign site_custom_field = layout.getGroup().getExpandoBridge().getAttribute("site_custom_field_key")>
<h1>${site_custom_field}</h1>
Have a nice day!
I have a Sharepoint library that is currently rendering as the usual folder and document items table list view.
I would like to use present the same information as a grid of folder and document icons with some nice jQuery hover animations to show tooltips on the item the icon represents.
I suppose what I am really trying to find out is how to add a new library view that allows me to specify the markup rendered per item. I could write a new webpart to query the list and use an ASP:Repeater but I don't want to have to specify a webpart property each page to tell the webpart where it should open the list from.
You can use List View Web Part with custom XSLT.