I'm trying to change the call of a dynamic image to a static default image, so I changed :
<f:media file="{mediaElement}" />
with :
<f:media file="{f:uri.image(src: 'paht_to_my_default_image\', treatIdAsReference:1}" />
but i get an error :
Argument 1 passed to TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::getRenderer() must implement interface TYPO3\CMS\Core\Resource\FileInterface, string given, called in /var/www/src/typo3_src-7.6.32/typo3/sysext/fluid/Classes/ViewHelpers/MediaViewHelper.php on line 90
I do not know if I have a syntax error.
If you use the file attribute it expects a uid of a file in the filelist. You could use the f:image viewhelper and give it a src attribute:
<f:image src="path_to_my_default_image" />
I solved my problem, the problem was at the syntax level.
This code below works perfectly :
<f:image src="EXT:myext/Resources/typo3_logo.png"
class="img-responsive lazyload"
title="{mediaElement.originalResource.title}"
alt="{mediaElement.originalResource.alternative}"
data="{src: '{f:uri.image(image:mediaElement,
width: settings.list.media.image.width,
height: settings.list.media.image.height,
maxWidth: settings.list.media.image.maxWidth,
maxHeight: settings.list.media.image.maxHeight)}'}"
width="{f:if(condition: settings.list.media.image.width, then:
settings.list.media.image.width, else: settings.media.width)}"
height="{f:if(condition: settings.list.media.image.height, then:
settings.list.media.image.height, else: settings.media.height)}"
/>
Related
i get some problem that when i use add to extend / use as arbitary values ->> bg-url is not working
\Arbirtary Values
bg-[url('../../images/product/model-s.jpg')]
-- Module not found: Error: Can't resolve '../../images/product/model-s.jpg' in '....\MAIN PROJECT\0.PORTOFOLIO\tesla-clone\client\src' --
\Extend
backgroundImage: {"model-s": "url('./src/images/product/model-s.jpg')", },
-- Module not found: Error: Can't resolve './src/images/product/model-s.jpg' in ''....\MAIN PROJECT\0.PORTOFOLIO\tesla-clone\client\src' --
### BUT.......
when i import it i can use it as <img />
import models from "../../images/product/model-s.jpg";
<img src={models} alt="model S" className="w-full h-full object-cover bg-center bg-no-repeat" />
Can you help me ? please....
Here you have making the mistake while using the image in component. Since you already defined the image in tailwind.config.js like
.
.
extend: {
backgroundImage: {
'model_s': "url('./src/images/product/model-s.jpg')"
}
}
.
.
You can simply use it like
<div className="bg-model_s" ></div>
Note : I had change the name from model-s to model_s
I have tried the following approach to be able to send variants as props.
type ipAddr =
| IPV4
| IPV8;
[#react.component]
let make = () => {
let appData = Data.tileData;
<div className="App">
<header className="flex outline justify-between" />
<Content selected={ipAddr.IPV4} appData />
</div>;
};
But it throws the error,
ninja: error: rebuilding 'build.ninja': subcommand failed
I have tried sending variants directly to Component as well.
<div className="App">
<header className="flex outline justify-between" />
<Content selected=IPV4 appData />
</div>;
But it ended up returning another error
Start compiling ninja: error: dependency cycle: src/App-ReactHooksTemplate.cmj -> src/Content-ReactHooksTemplate.cmj
-> src/App-ReactHooksTemplate.cmj
Finish compiling(exit: 1)
Where am I going wrong?
DISCLAIMER: I don't know ReasonML, however
If it was OCaml, you'd just write IPV4, no need to qualify it like ipAddr.IPV4.
Perhaps this is the same in Reason?
I have solved this another way. Instead of passing the variant as prop, I simply rendered different components based on variant value.
[#react.component]
let make = () => {
let appData = Data.tileData;
switch (selected) {
| IPV4 =>
<div>
<IPV4Renderer appData />
</div>
| IPV6 =>
<div>
<IPV6Renderer appData />
</div>
};
};
I am using the asp.net version of shieldui for charts and have a barchart and would like to set the primaryHeader or secondaryHeader with data from the database. I searched the documentation page of shieldui website and could not find anything.
What I tried is something like this:
<shield:ShieldChart ID="ShieldChart1" Width="100%" Height="200px" runat="server"
OnTakeDataSource="ShieldChart1_TakeDataSource"
CssClass="chart">
<PrimaryHeader Text=" ">
<Style Bold="true" FontSize="30px" />
</PrimaryHeader>
<SecondaryHeader Text="<asp:Label id="CardInvoiced" runat="server"/> ">
</SecondaryHeader>
<ExportOptions AllowExportToImage="false" AllowPrint="false" />
<Axes>
<shield:ChartAxisX
CategoricalValuesField="Area">
</shield:ChartAxisX>
<shield:ChartAxisY>
</shield:ChartAxisY>
</Axes>
<DataSeries>
<shield:ChartBarSeries DataFieldY="Sales" CollectionAlias="signups">
</shield:ChartBarSeries>
<shield:ChartBarSeries DataFieldY="Starts" CollectionAlias="starts">
</shield:ChartBarSeries>
<shield:ChartBarSeries DataFieldY="bis" CollectionAlias="bis">
</shield:ChartBarSeries>
<shield:ChartBarSeries DataFieldY="comps" CollectionAlias="comps">
</shield:ChartBarSeries>
</DataSeries>
</shield:ShieldChart>
ShieldUI error is:
Type 'Shield.Web.UI.ShieldChart' does not have a public property named 'Label'.
Any suggestion on how to accomplish this?
I solved this and here is how you set both PrimaryHeader and SecondaryHeader in ShieldUi graphs:
ShieldChartFSS7R.PrimaryHeader.Text = "Test Primary Header";
ShieldChartFSS7R.SecondaryHeader.Text = "Test Secondary Header";
Which shows the headers like this:
<hs-details-item>
<hs-label>Location</hs-label>
<hs-value-block>
<hs>
<hs-text-box ng-class="{'disabled': isAmenityPosting }" class="required" input-control="{title:'Location', okCallback:setJobSite, value:jobSiteName,
autocomplete:{ values:getJobSiteList, reload: true }, ss:'location'}">
<i class="icon-room"></i><span hs-placeholder="Select Location" class="ng-binding"></span>
</hs-text-box>
</hs>
<hs>
<!-- ngIf: isBarcodeShow() --><hs-button ng-class="{'disabled': soCreating }" class="barcode-special-btn smaller ng-scope" ng-if="isBarcodeShow()" hs-gesture="{handler:startScan, param: onBarcodeScanCompleted}"><i class="icon-br-code"></i></hs-button><!-- end ngIf: isBarcodeShow() -->
</hs>
</hs-value-block>
</hs-details-item>
Scenario: click on “Location” field...
What would be the best way to come up with a command in Protractor to select "location" field from the above Snippet Code?
Can it be done by not using Xpath?
Multiple options here. A sort of a non-welcomed, but short and readable way, would be to use an XPath expression and check the preceding label:
var locationTextBox = element(by.xpath("//hs-label[. = 'Location']/following::hs-text-box"));
locationTextBox.click();
I'm trying to realize mapnik-XML block in TileMill CartoCSS like this (!!! symbolizers in rules aren't overlaping !!!):
<Rule>
<Filter>[attr_1]=value_1 and [attr_2]=value_2</Filter>
<LineSymbolizer ... />
</Rule>
.
.
<Rule>
<Filter>[attr_1]=value_3 and [attr_2]=value_4</Filter>
<PolygonSymbolizer .../>
</Rule>
<Rule>
<ElseFilter/>
<TextSymbolizer .../>
</Rule>
And I didn't find in documentation how to make the else-filter.
[attr_1 = value_1] [attr_2 = value_2] {
::line-symb {
line-color: #color;
}
}
.
.
[attr_1 = value_3] [attr_2 = value_4] {
::polygon-symb {
polygon-fill: #color;
}
}
// <ElseFilter/> ...
Any advice?
There's no equivalent to else: think of CartoCSS as CSS, which also doesn't have an 'else': you would just write a rule that applies to the general case. So, if you're styling a layer by its attributes, the else is expressed by making a rule that just applies to the layer, with no attribute filters.