generating two files by using workflows in Teamsite - perlscript

I need your help/suggestion in teamsite(V6.7) coding for generating two files by using workflows means "How to generate a page at two different locations (in same branch) by using two different tpl files(desktop.tpl and mobile.tpl) but same DCR(abc.xml)"
I also guessed the idea/scenario that if any Perl script can be added in existing Workflow and while submitting the desktop file by using workflow to desktop location (/servername/default/main/sitefoldername/desktopsite/) then this workflow will also generate the same named file in mobile location(servername/default/main/sitefoldername/mobilesite/mobilepages/)
Please let me know if this kind of script can be developed
It would be a great help for me if you can provide your best solution into this.

Update the {iw-home}/local/config/templating.cfg to include the multiple presentations, one for each of your tpl file. You can use formAPI to set the location of the generated files.
Regards!

Yes, you can definitely generate two pages at a time.
You need to update the "templating.cfg" file and add all the different .tpl file names that you want to use but after doing this just try to generate some files using UI to cross check whether you are able to get the options for tpl selections if yes then you can proceed with the coding stuff. Also, you can refer some of these files: iwgen.ipl, iwpt_compile.ipl, iwtmplconfig.ipl and iwregen.ipl.
Please mark the solution and vote if it is useful.
Thanks!

Related

How to use multiple of the same executable on UGUI

I am using this tool to create a simple GUI with it's easy to understand set up: https://github.com/UniversalGUI/UGUI
But from what I understand from its guides that it needs executables to be in different names so that it can differentiate itself and the form sending it. The project I am doing needs me to use the same command but with different arguments such as:
<cmd executable="xdg-open">
<arg>/home/kali/Downloads/</arg>
</cmd>
I need to open other folders in different parts of the program using that executable. In the guides, the person did use an .exe file which I figured is a script included in its folder and I did try to replicate it but to no luck. https://www.youtube.com/watch?v=qHMRroZ7AAw
The tool isn't used by many but those who do, do you know how to get over this issue?

Need to understand gulp

I am new to gulp and i am getting object expected gulp error, but found solutions as rename file to gulfile.js
1) Need to understand every project has only one gulp file thats gulpfile.js? If i need to define more than one then how to and what will be the file name.
2)My requirement is to concatenate more than one less(convert to css) & js file into one and then apply it to index.html
3) I am using express to create gulp project structure. is this standard way? if no then how do i?
4) everytime i create gulp skeleton, do i need to install all packages again for every project?
Any references from where can learn gulp from basic.
I think one of the reasons you're getting downvoted is that on SO each question should be one question. This should really be four separate questions. Another reason is you haven't provided any of your code - add code (the { } icon) and include your gulpfile.js and your package.json.
1a) Yes, it has to be called gulpfile.js
1b) If you search SO and google for "multiple gulpfiles" you'll get a lot of solutions. If none of them work for you, let us know what you tried and what went wrong. But just so you know, it's better to start with just one gulpfile - it can be hard to get multiple gulpfiles working correctly, and using just one will help you learn gulp.
2) you'll need to use gulp-less and gulp-concat to turn multiple LESS files into one CSS file, and gulp-concat again to turn multiple js files into one.
3) You can use express, but you don't have to do. It depends what you're doing, and we have no idea what you're doing.
4) Not sure what you mean by "gulp skeleton". If you mean "Do I need to run npm install for every new project, yes you do.
5) Google "learn gulp"
6) If an image could just be text, it's better to just include the text.
If you need to, open new specific questions. For more on writing a great SO question, see https://stackoverflow.com/help/how-to-ask

yii2: where do my project's own html, css, js, and php-include files go?

Choices:
create an asset bundle (nicely explained by Ivo Renkema at How do I manage assets in Yii2?). this is what I need if I want to package my code for other use. alas, should I also do this for my own php include library functions? Or should I still stick them into the same php location as my other php files? In any case, if I want to go this route, presumably I would then customize the AppAsset class, included in the template, as explained in http://www.yiiframework.com/doc-2.0/guide-structure-assets.html .
stick my files directly into $basePath/web, where $basePath is typically something like /var/www/myapp/ (i.e., as $basePath/html/mine.html [and refer to it simply as href='/html/mine.html'], $basePath/css/mine.css , $basePath/js/mine.js, and $basePath/php/mine.php [and refer to it as $basePath= \Yii::getAlias('#webroot'); require_once('$basepath/php/mine.php') ])?
stick my local files where my php view code sits. the advantage is that the files are close to where I will use them. the disadvantage is that I may litter the view directories not only with php files, but also with my non-asset assets, even though they will be used only by these (my) php files.
it's a beginner's question for the google cache reference. it's about best practice when getting started. I can guess the answer, but we wouldn't want a novice to disseminate bad info.
If you need your CSS and JS files only in one view or one Controller you have 2 choices:
1- Create a asset bundle Here other guide if you need it.
2- Use registerJsFile() from View Class
You can acces from controller using:
Yii::$app->view->registerJsFile('js.path');
(Same with CSS files but using registerCssFile())
With the PHPfiles I always try to convert the code to yii's MVC. If you have a entire library try to add it as a component. Here a usefull guide

Rename Taxonomy label in editor bolt-cms

I would like to rename the default tab value of Taxonomy in the backend page editor. I didn't find anything in the twig or yml files that would address this. Any ideas?
I checked with bolt developers and there is no way currently to do this. One potential option was to use the messages file but it was not recommended.
As you can imagine, since this isn't supported via the public configs, this will need a bit more advanced plugging together.
Here is a way to add an additional resource to the stack of translations.
https://gist.github.com/rossriley/c74fdee4fec3eaffb12f
This is a technique to add your own messages onto the translation stack without touching the underlying core files.
After creating this, you'll need to add your new service provider to the app, which you normally will bootstrap either in your index.php or a custom bootstrap file.

Add code to html pages automatically

I need to add some code to the of several html contained in a folder on my desktop. How can i do that?
I am using a prototyping tool (Axure) on Mac and I want to add some html meta tags to the generated pages. These pages can be overwritten every time I generate the prototype. What I need is a sort of script that I can launch after re-generating the prototype, to reinsert the code. There is something for windows but it doesn't work on Mac: http://joshuamorse.com/2009/01/14/axure-protonotes-an-alternative-to-protoshare/
thanks
This is a very simple problem to solve using a shell script.
If you are not familiar with scripting, then check out the Automator program built-in to OS X.
This provides a "visual" way of building automation workflows.
This is the basic steps that your workflow will need to perform.
Find the files that need updating.
For each file
Open the file using TextEdit
Tell TextEdit to Find the Head element and replace with the new Head Element that includes the script
Save the file.
Repeat
How about a simple find/replace in multiple files using something like this:
http://search-and-replace.en.softonic.com/mac
If you are able to create some sort of 'dummy' tag in Axure, you could use that as the 'find' that you could replace with your meta tags.
That seems to be a simple way to do what you want.