Show a specific text in another file in Swift - swift

I would like to do the following: I have a file in which I can select a product. If the product has been selected (is it true) and the costs should be displayed on another page (with TabView). The problem is that I don't know how to access the variable in the other file.
I have already tried the following:
-if file.init(variable: true){…}
->Error
-if variable == true {…} ->Error
-Text(file.init(variable)
And the image will help you to understand me.
Link to the Images
I hope 🤞 you are the best in swift and can help me!!!

Related

Prestashop 1.7 - filtering not working, showing empty results

I have got a problem on my store (still under development) - http://condesign.pl/officina . It's all about filtering products, for example here: http://condesign.pl/officina/pl/521-akcesoria-ze-skory . All the attributes on the left are being displayed correctly, with numbers of products in brackets, but when You click on any filter (like size or color), the list of results is empty.
Help please!
Try yo do the exact same thing with the default theme of Prestahsop. Because this looks like a theme issue.
This is very large bug in ps_facetedsearch module... You can't do anything with this. You must wait for fix. https://github.com/PrestaShop/PrestaShop/issues/9684 here is list of bugs in module.
It was my mistake - this module uses table ps_stock_available. I was migrating data from previous store to this one (only in phpmyadmin, not panel, because of very different structures), and I didn't know about this table. So it was about my missing data.

How does one get the total number of slides?

In Articulate's Storyline product, how does one retrieve the total number of slides (or pages) in a storyfile or project?
There's not much documentation so it's kind of hard to figure out how to query common environment values like this. If we can get the total number of slides then we don't have to manually set a value for it.
One must manually set and update a variable to store the number of slides.
The most lengthy conversation on the matter seems to be found here at the Articulate forums.
In that thread the users and staff describe the need to manually define such a variable.
I asked the question on the official forum more directly here, and so far have not received a response.
Another poster at that forum mentioned using PHP to solve this problem, but unfortunately we can't add the requirement of PHP to the final product. I'm sure some server side language tricks might be used to solve this issue, but that also adds the dependency of a particular server-side language.
The Answer Mark gave is correct. So if you want to track the number of question slides in a quiz you would either hard code the value in a variable such as totalQuestions, or increment it as you go through each slide using adjust variable trigger. To call that value and display it on screen you would just add it to a text field and surround it with "%".
EG. "You have answered %Results.ScorePoints% out of %totalQuestions% questions correctly."
I find it rather pointless to hard code it since it's just as easy to put the value in the text field at the end. Using the increment method seems more logical because then you can add more question slides without having to adjust the variable or results screen each time.
I usually load frame.xml, browse for all slidelink tags and sort all slides by their Id.
Usually you get something like slideid=_player.5xoxGTW6QCh.6bmeRt3tCqP, where 5xoxGTW6QCh is the scene id and 6bmeRt3tCqP is the slide id. displaytext also gives you the slide title.
If you browse for slidetranscript and match the Id for each transcript you also get the slide notes.
Articulate 360 now has an internal (Built-in) variable for this and other counts. See Project.TotalSlides and Menu.TotalSlides
See https://community.articulate.com/series/articulate-storyline-360/articles/storyline-360-add-slide-numbers

Create and Update wiki pages using MediaWiki::API

I am newbie in perl programming. I'm creating wikipages using perl.
So, I am updating whole wiki page using MediaWiki ::API interface.
Code is as follows:
my $wiki = MediaWiki::API->new();
# [...code...]
$wiki->edit( { title => "My_page", text => $all_lines, action => 'edit'} );
My question is, What if I have to update only some portion of webpage ??
NOT ENTIRE WEBPAGE ?
And selection of that part of webpage is dynamic. That means, it depends on what input file I get from user.
So lets say, if user says modify "Introduction" section in webpage then,I should be able to search that particular section and update ?
Any pointers or any suggestions would be appreciated.
Thank you.
You need to set the section parameter.

tt_news: use news title as download title in list view

My news should not contain any text, except for the title. Instead, in the list view the title should directly point to the first attached file (a PDF).
Now I thought the simplest solution for that would be to hide the title, show only the attached files and give them the title of the related news entry via TypoScript.
For the detail view this code works fine:
plugin.tt_news.newsFiles {
labelStdWrap.cObject = TEXT
labelStdWrap.cObject.dataWrap = DB:tt_news:{GPvar:tx_ttnews|tt_news}:title
labelStdWrap.cObject.wrap3 = {|}
labelStdWrap.cObject.insertData = 1
}
...but it uses the GPvar for the currently displayed news, which of course is not present in list view.
So my question is: how do I get the ID of the currently iterated news entry, if possible at all?
I am open to other solutions as well.
You will need to use custom itemMarkerArrayFunc - fastest by copying the sample into your own extension: typo3conf/ext/tt_news/res/example_itemMarkerArrayFunc.php and adding custom marker to $markerArray.
The mentioned sample even demonstrates access to files so I assume that should not be a problem to modify it for your needs.
Note: if you haven't any own ext to copy the func into it, and you don't want to create such, try to copy it somewhere under fileadmin folder, modifying files in original destination is wrong idea, cause you'll lost all changes after next tt_news' update.
Easiest solution I found is using the labelStdWrap:
plugin.tt_news.newsFiles {
labelStdWrap = TEXT
labelStdWrap.field= title
}
More options can be found here: http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.0.0/view/5/13/

How do I get Zend_Navigation to work with database defined data?

I've got a Zend_Navigation component I use to display breadcrumbs on a page. It currently says something like:
"Companies > Edit a Company"
when displaying the edit form. I would like to make it say something like
"Companies > Editing FooBar"
What's the best way to accomplish that?
I had the problem that I wanted to show breadcrumbs even when the parent is set to not visible. Drove me nuts until I found the reason. Your problem is not much different, I think.
I have a unique ID set with basically all links; hence, I can fetch all nodes like the following:
// in view scripts
$navObject = $this->navigation()->findOneById($id);
// now you can manipulate the object however you like
$navObject->setLabel('Editing FooBar');
You can find the node by other means, there is findOneBy() method where you have to pass the target object.
Once I printed the breadcrumbs I had to reset setVisible(false) to the old value, though. Depending on your needs you might have to reset the label, too.