How can I set up a Drupal rules action to play a specific sound file.
Eg I thought I can do this with the action 'fetch an entity', the entity value as 'file' and the property value 'title' (thinking title would be the file name?) but then how can I enter the file name? The only options for the property value are data selectors, which do not include the file names.
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.
I would like to display certain first level menuitem in bold.
This setting should be done by a checkbox when the user create / edit a menu item. (I have a workaround using the Model.Href, but it is not nice).
So I created a boolean field in Content definition / Menuitem URL (I don't know the name of the corresponding content definition in English Orchard).
How to access a custom field (Content Field) from a view?
(There already is a view which is used to customize the menu)
The examples I found use custom shapes, where the fields are accessed as built in fields (e.g. Model.ContentItem.FieldName ). But this is a different case.
With the help of "Piedone", the solution:
Model.Content.ContentItem.MenuItem.FieldTechnicalName.Value
Explanation
Examining the Model object in Visual Studio, the Model is a dynamic shape that have eg. Href property and a Content.
Content is a MenuPart, that is a content part that have a ContentItem property with the content item itself. Technically only content parts have Fields. When you (seemingly) add a field to a type it will be a part corresponding the type's name, that is MenuItem in this case (It's confusing that the display name of 'MenuItem' content type is Custom Link...)
The field's technical name is as you name it. When you add to a type, the Value will be a property of the BooleanField class. (By the way, it is nullable, so if you dont't save after adding the field, it will be null else the value you set).
I've a document in database which have multipart MIME content which includes text and image. And i'm trying to get that value and set as default value of another inputRichText, so that when i'll open the Xpage the value from database document should be appear as default value of that inputRichText which is included in the opened Xpage.
I've already binded that inputRichText with "Body" and i want to set a default value of that like a mail signatures.
I have been looking through many forums but I was unsuccessful :(
I need to display the content of a OpenCart custom page in the search page.
Ta very much
You just need to execute that custom controller, save its output in the data list of the search page template and display it there where ever you want
(1) Open the file "<OC_ROOT>/catalog/controller/product/search.php", you will find a class named "ControllerProductSearch", we are interested in the function "index()"
(2) Find the statement
$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
(3) Add the route of your custom controller in the array $this->children, now OC will automatically evaluate your custom controller and send the HTML in a variable to the template, the variable name will be the last component in the route (e.g if your route is common/my_customer_controller, the name will be $my_custome_controller)
(4) Open the search page template file "<OC_ROOT>/catalog/view/theme/<YOUR_THEME_FOLDER>/template/product/search.tpl", and use the variable there
P.S. Make sure that you define your custom controller in the same way other controllers are defined (file naming style, class name based on the route ...), other wise the above solution won't work
I created a new content definition, added a field "Media Library Picker Field" MYIMAGE.
There I can configure some things like "A content item is required" ... "Content Types and Parts" but I left them blank.
Then I can successfully select a image from my media library and see it from Admin/Contents/List.
Then I made a new query: I selected new layout, Html List, selected properties, add new property: "Title Part Title" with no configuration and MYIMAGE:Ids with no configuration.
Then I created a projection so I can see for every match of the query the titles BUT NO Ids.
I searched in shape tracing, i suppose I can find it in Zone[Content]->Content->List->PropertyWrapper (this is the first query result) and then under the Model Tab I suppose Model->Items->[0] should be the title so #Model.Items[1] should be the Ids.
How can I get the image's Id from #Model.Items[1]? And the URL?
This issue has been resolved. See https://orchard.codeplex.com/workitem/19956.
There is also a module called Vitus.Utils that adds some very useful tokens for Media Library items. See http://gallery.orchardproject.net/List/Modules/Orchard.Module.Vitus.Utils/1.0