How to pass multiple parameters into Label Template? - umbraco7

Is there a way to pass multiple parameters to Label Template function? It doesn't seem to work out of the box.

You should be able to use multiple fields. For example:
{{prop1}} - {{prop2}}
in the label template should work. Not sure about your custom function though. Looking at the docs here: https://github.com/kgiszewski/ArchetypeManual/blob/master/02%20-%20Configuration.md it looks like you can pass multiple arguments maybe?

Related

How to give custom name when printjs library used

I am able to do print functionality using printjs but i want to give custom name which i failed to do it.Any suggestions would help me to achieve this.
Print.js has a property named documentTitle where you can pass a document title when printing html, json and images. It also has a header option as well if that's what you are looking for. Take a look at the lib api options here:
https://printjs.crabbly.com/#configuration

Custom child commands for UI elements

We're currently using Select2 for all our <select> elements and for obvious reasons cy.get("#element").select("foo") won't work. As per the docs we've created our own custom command cy.get("#element").select2("foo") which just wraps a number of steps to select "foo".
This works well when trying to select a value but we'd like to avoid adding custom commands for clear(), value(), etc.
We'd also like to avoid using the Select2 API because this would require someone to understand that API as opposed to just working in the Cypress API.
We'd like to create something a bit more flexible by instead having a Cypress friendly object. Something that would look like this:
cy.get("#element").select2().as("select2");
cy.get("#select2").select("foo");
cy.get("#select2").should("be.equal", "foo");
cy.get("#select2").clear();
Is it possible to create a child-command that returns an object that can then override these built in commands?
We're unable to return our custom object from our custom command without first cy.wraping it which defeats the purpose.

How can I register a function to use with pongo templates?

I want to be able to register a function in pongo2 to be able to use in the template. I don't want to use it as a filter. I want to call it as a function. How can I go about this? I don't see any method to RegisterFunction like I can RegisterFilter
I have tried to use RegisterFilter but it doesn't fit my exact use-case which is to call a function to get some data and not to filter an input

Go Template - calling another template with multiple parameters

I'm using an application that is getting me some data, and then renders a config file based on a given Go Template. You basically pass a template you've made as a parameter, and app does it's job with it. The template is getting bigger and bigger, so I wanted to wrap some common stuff into sub-templates (I mean, {{ define x }}). The problem I'm occuring is that the sub-template should be passed serveral parameters, which are not a part of my 'dot', and I can't really find a way to do this in Go.
The best answer I've found is to write some 'dict' function myself, and then use it inside the template, but that would mean I basically need to fork the whole application I'm using to render the template, do like 10-15 line changes, and then use this modified versions, which is a nonsense.
I'm wondering if there's any real solution for my problem without having to do some crazy forking and writing custom methods on application side?
Edit:
I've already checked Calling a template with several pipeline parameters before, although it's not answering my question, since I need a way to do this using only template file.

CodeIgniter Pagination & GET

See: http://codeigniter.com/user_guide/libraries/pagination.html
I do not want to use URI segments for my pagination (as I have a lot of possible parameters to pass in unknown order). Currently, I have $config['enable_query_strings'] = FALSE;, and if I set it to TRUE, I get something like this (from CI's example):
http://example.com/index.php?c=test&m=page&per_page=20
Where "c" is the controller, "m" is the method, etc. This is not what I want.
I want something like this:
http://domain.com/?min_amount=100&max_amount=200&color=blue&size=large&limit=20&limit_offset=100
Is there a way to achieve this in CI? If not, is there some library already available that I can use?
In CodeIgniter, there are two configuration options when it comes to query strings.
One option ($config['allow_get_array'], enabled by default) allows you to pass additional queries on to the already segmented URI, which would then be available via the $this->input->get() controller library function. You would set the pagination config using this function, allowing you to separate the route, and the pagination instructions.
The other option ($config['enable_query_strings']) forces you to use the query strings in place of the segmented URIs.

Resources