Postman - Adding parameters in between - postman

I am using Postman to test the API using POST request. I have added multiple parameters in POST request. I am following sequence as specified in form. I have missed some of the parameters in between.
E.g: I want to add multiple parameters in between s_LastName and s_ReplacementCost from below image.
Is it possible to add those parameters in between ?

There are a couple of ways that you can move the different params. Add the new ones to the bottom of the form, then use the hambuger icon and drag them to the desired location.
Alternatively, add the new values to the form, select the 'Bulk Edit' option and cut and paste them into the desired location.

Related

Typo3 / blank Templates

I'm a greenhorn with typo3 templating. Actually I'm using "bootstrap_package" (standard layout). I would like to create a sub-page without logo, menu and footnote. I just want to have the content elements on a blank page. How do I do this? Can anyone help me?
Best regards
cgroughy
You should give some more information why you need such a special rendering to get some more detailed help.
The usual reasons for such a page are design flaws as there are more suitable solutions inside TYPO3.
In general: You need to create a new page rendering, where you switch off the generation of the HTML header.
add on:
make a page where you collect all the pages which should be available in this special rendering. This page should be a subpage from your root-page. regarding relaurl: [x] exclude from path
in this page create a typoscript template record.
as these pages need only one rendering I propose to modify the default page object instead of creating a new page object (with a new typeNum).
in the setup field of this template record remove all headers with:
config.disableAllHeaderCode = 1
You might need to disable further CSS and JS, especially if they are loaded at the end of the page.
if you need another html-markup than the default you can modify the configuration here: wraps, (fluid-)templates, ...
Then add your special pages with content.

Programmatically add an argument to a view that already uses a contextual filter

I have a view that uses the id of the currently logged in user as a contextual filter. This was set using the Drupal UI and works well. Then I wrote a custom module that adds another parameter (a specific node id) to all views on my site. All views need this second parameter (and it needs to be added programmatically). This approach works well for all views that only use the programmatically added parameter as a contextual filter. However, the view that needs 2 filter values does not work, because I think I do not handle the order of parameters in the args array correctly. How do I set up views that already use filter values, but I need to add more programmatically (I set $args[0], but I guess this might be the problem) ?
I should say that I do not want those filters to appear in the URL.
testmod.module:
function testmod_views_pre_view($view, $display_id, array &$args) {
...
$args[0] = $value;
}
I thought I could just read the view's $arg array and add my special argument to it programmatically, but for the view that uses the logged-in user as a contextual filter, when I print print_r($args) it is an empty array, although the view is working correctly (and only shows results for the current user). Are contextual filters that I set up via the UI stored in a different place than $args ?
What needs to be done to tell the view how to use the 1. and 2. filter values correctly ? I'm a bit lost here.
Edit: I read that hook_views_pre_view() is too early to find contextual filters in the arg array (at that point you would only see arguments in that array passed via URL). Which hook would be best to achieve what I'd like to do ?
I now have a better understanding and found a solution. hook_views_pre_view() is indeed too early to see arguments that are NOT passed to the view via URL. That explains why $view->args was empty in my case. In hook_views_post_build() you do see ALL arguments (URL+nonURL) passed to the view. However, the way I solved my issue is still using $args[0] = $value; in hook_views_pre_view. That means the first argument passed to all views will always be $value. For views that are using additional arguments, Drupal will add them to $args later on. In my special case I have views that might not necessarily need the first argument that I pass, so I had to add a contextual filter Global: Null (at the first position) that allows a contextual filter value to be ignored (and as a default I set 0). This way each view does have the correct number of contextual filters and the order is correct, whether the view needs to use the very first argument or not. It might not seem intuituve to pass an argument to every view, even though not all views really need it, but adding a Global: Null dummy filter is easier than excluding views in an if() statement and always having to modify the module code when a new view has to be added later on.

Ember.js multiple views for same controller OR wizard like routes; how to?

Scenario:
You have something like a wizard. The user completes something on the first page, click next and go to second page and so on until he reaches the last page. Here he clicks finish and all his input is stored and persisted using an ember model.
There are two other questions similar to this one:
Ember.js wizard control
Multi-step form (or multiple "pages") in one route using Ember.js
At first I've tried with a route/controller/view for each step, but since the answers are basically a controller's state variables and get lost while transitioning, it is obvious that it cannot work like this!
Then I took the approach described in the above links. One route, one controller, one template with lots of {{#if }} so that I show only the fields of the current step. I think I might improve this by using partials and so each step will have its own template.
The question is: is this the only/the best approach? Does anyone figured out a better way to implement such a flow?
If you make each wizard page a component and then pass the model as a template parameter to each component, you get a pretty nice workflow. The URL is stable (not constantly adding junk onto the end in order to pass state around); it's easy to drop the user into the first step whenever they enter the route (such as manually inputing the URL or perhaps more importantly, finishing the wizard and then hitting the browser's back button); and you can perform validation on each page of the wizard.
Check out my longer answer here
One of the possible approaches would be using Query Parameters so that you can manage a state of each step in a single wizard controller.

Sitecore Page Editor issue

I was trying to move components in Page Editor mode , and below are the things I have done to achieve this :
Set Compatible rendering selected for the Sublayouts
Added placeholder settings and allowed controls for placeholders
But , when I was trying to move components, the DataSourceItems for the sublayouts are not changing , hence the content is not changing.
And , also sometime I am getting Field related errors if the fields are different in the DataSources.
Can someone please help me in this .
From your question, it sounds like you are trying to move a component from one placeholder to another in Page Editor. That does not affect the data source.
If instead you mean you are trying to personalize the experience by using rules to switch the data source within a sublayout, the steps you've taken won't allow for that. You need to add conditions to the sublayout in Page Editor to choose which data source you want to display.
If you are trying to have compatible renderings (different sublayouts) show for the same placeholder, that is something that is done by your step 1. This is only to help authors know what other sublayouts would be a good idea to put in that placeholder. It does not affect the data source.
When you add components, the datasource for them is not set automatically. You need to check if it's set and use Sitecore.Context.Item if it's not.
Not sure if that's what you mean..
As for field related errors, please post more details.

Use a link as a form field without javascript

i'm almost done developing a search engine in django 1.3. I'm having some filters on the left side of my application.
What i want to do is display those filters as links (not as radiobuttons /selectbox /checkbox) and whenever a user clicks on one of those links, the form is resubmitted with that filter's value submitted (maybe grabbed by a TextInput widget)
Basically, something like the left side filtering in this example from Google, but without javascript (so even a "non js user" can use my website)
Is it possible? How? Or am i bound to javascripts for this purpose?
Thanks all in advance!
Why not simply use GET query parameters?
Imagine the following:
User searches for "bear", the URL becomes: /search/?q=bear
The query parameters are handled by your view (collect all images corresponding to the query parameters)
The query parameters are sent back to the template in a variable;
Each filter link has the query parameters attached to it together with its own specific parameters, so that the filter link for e.g. medium-sized images becomes /search/?q=bear&size=medium;
Upon clicking that filter link, your view will get a q and an size key in its request.GET dictionary;
Repeat ad infinitum (e.g. /search/?q=bear&size=medium&expression=smiling&color=b-w&activity=dancing).