Typo3 6.2: Table Records in FCE (Flux) - typo3

I am trying to get a list of table-records in my FCE.
In documentation, i found the part "items" can use a Query.
But i can not find a way to make it work.
<flux:field.select name="myRecord" items="NOTHING WORKS HERE" label="Choose" maxItems="1" minItems="1" size="5" multiple="false" />
Does anybody know how the items can be filled with table-records ?

If you are trying to get the select box with all items maybe you can then switch to this:
<flux:field.relation size="1" minItems="0" table="tx_{YourExtensionName}_domain_model_{YourObjectName}" maxItems="1" name="package">
</flux:field.relation>
Of corse, you can use any table from the DB, like "pages"..
Hope it helps!

Related

Can I GET without the ID?

I need to get a result from a table where I only know a few values from a report.
Which is the EntryID found on the 3rd line and the description
I'm only new to RestApi's
But how could i filter through and fine this particular result without having the transaction ID.
My url looks something like this
https://publicfacingURL/ServerName/services/select/Transaction/{transactionid}
<Transaction>
<TransactionID>1656286</TransactionID>
<EntryID>39013</EntryID>
<ChargeGroupID>88</ChargeGroupID>
<ChargeItemID>0</ChargeItemID>
<TransactionTypeEnum>Payment</TransactionTypeEnum>
<TransactionDate>2020-01-04T22:22:57.427</TransactionDate>
<ProcessedDate>2020-01-04T22:23:44.74</ProcessedDate>
<DueDate />
<Description>Web account payment #WEBR123123</Description>
<Amount>-398.0000</Amount>
<Duration>0</Duration>
<CallTypeEnum>Other</CallTypeEnum>
<Comments>CC Type used: Visa</Comments>
<Reference_BookingID>0</Reference_BookingID>
<PaidFrom />
<PaidTo />
<Excess>0</Excess>
<ExternalReceiptID></ExternalReceiptID>
<DateModified>2020-01-04T22:23:44.773</DateModified>
</Transaction>
I just updated to reflect the following below.
https://publicfacingurl/ServerName/services/select/transaction?entryid={entryId}
Thanks for everyone's help.

Dynamic UID to edit the current news item

I use "Frontend_Editing" extension on TYPO3, to edit News items from Frontend.
How can i edit this code to change uid with the value of the current News item :
<core:contentEditable table="tx_news_domain_model_news" uid="9">
<f:render section="content" />
</core:contentEditable>
Did you have a look at the documentation of EXT:frontend_editing?
A full example for inline editing of a certain field looks like this:
<core:contentEditable table="{item.table}" field="{item.field}" uid="{item.uid}">
{item.bodytext}
</core:contentEditable>
I found the solution uid="{item.uid}" need to be uid="{newsItem.uid}"
So the code is :
<core:contentEditable table="tx_news_domain_model_news" uid="{newsItem.uid}">
<f:render section="content" />
</core:contentEditable>

typo3 flux select multiple pages suggest wizard

<flux:field.input name="pages">
<flux:wizard.link label="Select link" activeTab="pages" />
</flux:field.input>
with this I can select ONE page. But how can I select MULTIPLE pages, like it is done at the Menu-Content-Items.
tryed: field.select -needs an item-propery.
field.relation I did not succeed, too.
Thank you for your help,
Christian.
Edit: This is what I'm currently trying:
<flux:field.relation
name="settings.relationtest"
label="relationtest"
multiple="true"
size="6"
minItems="0"
maxItems="30"
renderMode="singlebox"
foreignTableField="pages"
>
<flux:wizard.suggest
label="NULL"
hideParent="0"
pidDepth=""
minimumCharacters="1"
searchWholePhrase="0"
table="pages"/>
</flux:field.relation>
Had the same problem and tried a lot with different viewhelpers. flux:field.relation seems the right solution for this one. I use a quite simple snippet:
<flux:field.relation label="Auswahl der Seiten" table="pages" size="6" multiple="true" minItems="0" maxItems="30" name="parentpages">
<flux:wizard.suggest />
</flux:field.relation>
Selecting multiple pages works fine.
Perhaps your problem came from setting the 'table' parameter on flux.wizard.suggest (Link).

Alfresco Custom Data List Type Text Field Help Text

I've successfully created a new Data List type in Alfresco, but was struggling to figure out what the tag is called to achieve a description under a field. I consulted the Data Dictionary, but was unable to find it.
It may not exist, but the this screenshot makes me hopeful. As you can see, the Modified Date field has the DD/MM/YYYY help text under it. This is exactly what I want to put under the Program Name field, but with my own string.
<property name="orpdl:programName">
<title>Program Name</title>
<type>d:text</type>
<helptext>What's this tag called?</helptext>
<mandatory>true</mandatory>
</property>
Eeuh that's just a div in the control field for all the date fields.
Take a look at alfresco/site-webscripts/org/alfresco/components/form/controls/date.ftl
The message you see is in this div:
<div class="format-info">
<span class="date-format">${msg("form.control.date-picker.display.date.format")}</span>
<#if showTime><span class="time-format<#if disabled>-disabled</#if>">${msg("form.control.date-picker.display.time.format")}</span></#if>
</div>
So you want a string, just create your own custom controller based on textfield.ftl and put whatever string you like. Probably best to do that by passing it through the control-params.

Umbraco - Displaying a specific image within a macro for-each child of certain node

Umbraco newbie here. I've researched a tonne but can't seem to find what I' looking for.
I have a site with a slider on the homepage, the slider is sitting in a macro which is using a for-each (of a nodes children) with a final goal to display the 'heroImage' image from that doctype. I cant post images as a newbie to this site, but heres my content structure:
HOME
PORTFOLIO
- First Item
- Another Item
ABOUT
CONTACT US
Home, Portfolio, ABOUT and CONTACT US are "Landing Pages" document types, and the children under Portfolio (First Item and Another Item) are "Portfolio Entries" document types. Below is the code on "Landing Page" calling the Slideshow macro.
Portfolio Entry has fields:
heroImage
images
body
Slideshow macro obviously being the highlight there. Easy enough. Heres my macro code where you'll see I'm trying to display the heroImage of the node in question for each 'for-each'.
<xsl:template match="/">
<!-- slider -->
<div id="slideshow">
<div id="slider" class="nivoSlider">
<xsl:for-each select="umbraco.library:GetXmlNodeById(1081)/*[#isDoc and position() < 4]">
<xsl:variable name="mediaId" select="umbraco.library:GetMedia(#id, 'false')/data [#alias = 'umbracoFile']" />
<xsl:if test="$mediaId > 0">
<xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
<xsl:if test="count($mediaNode/data) > 0 and string($mediaNode/data[#alias='umbracoFile']) != ''">
<img src="{$mediaNode/data[#alias='umbracoFile']}" alt="[image]" />
</xsl:if>
</xsl:if>
</xsl:for-each>
</div>
</div>
<!-- data-transition="slideInLeft" -->
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
</xsl:template>
I feel like im so close, and ran out of search queries as most of the solutions I found were dependant on the imageId being passed onto the macro from the other side of the macro which wouldn't work.
Hope Ive explained this enough and thanks in advance for your help!
First of all, it looks like you're hardcoding the parent node id. In the code you just provided, it seems to only be getting the children of the node with id 1081. From reading what you just posted, it would seem that on all landing pages, you want to display their individual portfolio entries.
Either way, I would stay away from hardcoding IDs. If the node id changes in any way(user deletes the node, it gets exported as a package to the live environment, etc), your code will stop working. I'd just use $currentPage instead.
Judging by your filter, I imagine you only want the first 3 items to show in the slider. The code seems correct, but you seem to be using the old schema and its associated xpath. If you're using a newer version of Umbraco, the way you reference node data in xslt would have changed. I would guess that you've found many code examples and tried merging them together, without realising they wouldn't call the same schema.
This wiki link will provide more information, and hopefully fix your problem if you're using the wrong xpath.