I am trying to enable siteEdit for the Embedded fields for the pages implemented using DD4T.
I am able to find the methods and tags which helps to enable it for normal methods and component presentation but not for Embedded Fields and at the components(directly passing the Icompoennt model) level.
I am trying to enable it for SiteEdit2012(UI)
Please help.
The same as a 'normal' field. Imagine you have an embedded field called 'address' with 2 fields: street and number. This is how you would make it !SiteEdit enabled:
//Street
#Html.SiteEditField(Model.Component, Model.Component.Fields["address"].EmbeddedValues[0]["street"])
//Number
#Html.SiteEditField(Model.Component, Model.Component.Fields["address"].EmbeddedValues[0]["number"])
Related
How do I find all the text modules used in an Adobe Form? Is there a table somewhat like TADIR where I could type in the Adobe Form name and the object names (text modules) for that form name will appear?
My answer regarding Smart Forms is perfectly valid for Adobe Forms too. Adobe Forms also have SO11 text elements hard-coded in the form FM code. The only difference is link between Adobe form FM and Adobe form INCLUDE: for some reason there is no link for them in the D010INC table.
However, as your intention is to find text elements of a single form, and not mass searching, you can find out the INCLUDE manually.
Find out Adobe form function module name. You can do this either manually (Test button in SFP tcode)
or via the FP_FUNCTION_MODULE_NAME FM. Resulting Adobe Form function module name should follow /1BCDWB/SM0000XXX pattern.
Open this FM in SE37 and go to function group code (GoTo->Main program). There you will find something like this and there get the name of main INCLUDE, which holds the code.
Then by forward navigation go to INCLUDE code and by simple Find of %textkey-name pattern you can observe all text elements which were utilized in the form.
Sonat admin bundle allow to edit only text fields and boolean, i would like to know if there a way to override sonata make it edit datetime/date fields.
Thank you in advance!
At this time , they only support scalar types :
Theses types accept an editable parameter to edit the value from within the list action. This is currently limited to scalar types (text, integer, url...).
https://sonata-project.org/bundles/admin/master/doc/reference/field_types.html
I guess to have to digg more into the documentation to get it working. ( See how scalar types are dealt with and try to write similar logic )
Not sure in which version they added this (can't find it in the change log), but in admin bundle 3.8.0 adding 'editable' => true' to a date field in a list makes it editable alright. The value becomes underlined with a dashed line and clicking it opens a jQuery date selector.
I am integrating Drupal Webform with the CRM Highrise - I'm using the Highrise Drupal module (https://drupal.org/project/highrise) to create some mapping - however I want to extend the module to pass additional form values to the "background" field designated within Highrise, the issue I'm running into is that rather than passing the form value of say "Birthday Party" it's simply returning "array" in Highrise, below is the code I have right now:
//initial variable declaration
$form['#get_eventtype'] = drupal_render($event_type);
//making the call to post to Highrise
case 4:
$background = $form_state['values']['submitted'][$row['cid']];
$background .= $form['#get_eventtype'];
$new_person->setBackground($background);
break;
Have you dumped the value in $background after you retrieve it from the form? It is going to be an array and your value will be in one of the array elements. If you haven't already, I would suggest installing the devel module to help you dig into the form structure.
As a FYI I ended up just using Formstack.com - which gives you the ability to easily map custom fields created in Highrise with the form you create using Formstack. Upon creating a form with Formstack I embedded the JavaScript tag provided and was good to go.
I'm researching options to synchronize external data to a Category and Keyword list.
I have a metadata field with a states field that uses a category called US States.
When I preview my component with a simple XSLT component template (<xsl:copy-of select="." />), I can see:
<tcm:Content>
...
</tcm:Content>
<tcm:Metadata><Metadata xmlns="http://createandbreak.net/schema/generic">
<states>California</states>
<states>New York</states>
</Metadata></tcm:Metadata>
When I update the keyword and preview, I can see updated values.
<tcm:Content>
...
</tcm:Content>
<tcm:Metadata><Metadata xmlns="http://createandbreak.net/schema/generic">
<states>Californias</states>
<states>New York</states>
</Metadata></tcm:Metadata>
Which is great. It looks like we do not need to synchronize components (open, edit, and save) to use updated keywords. Is that a safe assumption?
If I update a keyword, do I need to update components that use it in order to publish component presentations with the updated values?
Do I need to also be careful when moving components with content porter?
No, you don't need to do anything manually for those Keyword fields to be "Content Porter"-safe. Tridion stores the link from your Keyword field to the Keyword definition (in the category) as a so-called managed link (a TCM URI).
The reason you don't see this value in your XSLT has to do with the way Tridion traditionally exposes the Keywords in WebDAV: it hides the TCM URIs there and instead just exposes the value of the selected keyword. Since Keyword values must be unique within their category, this will always allow you to look up the correct TCM URI if needed.
But when exporting (and in general when you're using the API to access content) you should retrieve the Component XML with the TCM URIs in place. Check the API documentation for your programming language to see which Filter/ReadOption you need to specify for that.
I know that tokens (token module) can be used to fill in tokens.
But for my articles (of node type page) how can I use tokens so that my site's name etc. can replaced automatically?
Check out the Token Filter module. It will allow you to use tokens within your node body field.
From the module page:
In the text where you use that input filter you can use substitution tokens with
[token global site-name] etc. You can use the global context, the user context and any
custom context available. You need to enable the Token Filter for any of your existing
filter types first.
For instructions on using this module, see the README.txt
Drupal 7
Install and enable Token Filter module and enable 'Replace tokens' filter e.g. for Full HTML text format.
For testing may edit any node and just type [site:name] to see if that works.
For Help, as admin go to Help->Token and you will find all the tokens you can use (/admin/help/token).