Hi,
I have installed the knime server and started making changes for the customized webportalTemplate.goldmining. In the HTML code, many of the div tags are given with location ID. For example
Now if I want to change the background color of this button. I cannot give the gold-button class name as it changes the background color of the complete div and not the login button.
I referred to Customizing WebPortal layout under https://docs.knime.com/2018-12/server_admin_guide/index.html#knime-webportal and found that these are the location ID’s given to the elements. But what exactly does this mean? and how is the button being created?
Hi,
if you want to change the button background color, the best thing to do is to add a CSS rule in the knime_template.css file. If you examine the HTML generated you will see that the button is an <input type="submit" ...>
.
So to style it you should be able to do something like .gold-button input: [...]
.
For any other cases I suggest examining the rendered HTML with the template applied first and then adjusting the CSS rules accordingly.
The location IDs are used to mark elements as containers for components that can be inserted into them. In the case of the button there is a div in which the button is inserted by the server. Some of these fields are mandatory to exist in your template, others you can add or remove as you see fit. The documentation should state how each id is supposed to be used.
Hope this helps,
Christian
1 Like
Hi, Thanks a lot for the reply.
Need one more clarification. So I have started customizing the gold mining template and was able to edit the login page as per my needs. Is it allowed to style the other pages after logging into the portal?
Suppose I would like to change the background image of the homepage soon after logging in. is it allowed in the template files? Attached the screenshot of the home page for your idea.
Hi,
so the page you are referring to here is the admin page, which is unfortunately not customisable. However a normal user won’t have access to this page. In your case it is simply displayed because you did not supply a server license and without it you can’t use (or preview) the WebPortal.
The rest of the WebPortal is customisable via templates. You can use the different html files mentioned in the documentation to adjust the different parts of the page.
Christian