Setting background image via Portal UI

Yang Wen asked on March 30, 2015 23:05

This is a very basic scenario -

Description of how the HTML mock-up is structured: Each page has a hero image DIV region at the top. The DIV has hero image set as its background-image. Within the DIV are heading and subheading text (H1 and P elements respectfully).

I've defined the 2 web parts for the heading and subheading and they function intuitively for a non-technical author. However how do I allow the author to define the background hero image?

I want the author to be able to upload an image to be used as a hero image for this page. That image should be set as the background for the hero image DIV region.

Thanks.

Correct Answer

Brenden Kehren answered on March 31, 2015 00:40

@Yang regarding

our Official Kentico trainer that a page can be designed using either the Design tab OR the Form tab. Not a combination of the both tabs.

The design tab is just that, you set where the content is to be displayed on your page template, you don't add content there. The Form and the Pages tab are where you add content. As Suneel stated, it is best to use a new custom page type with the fields you need added and then in your transformation you display those values of the field.

Personally I use what Kentico has designed and recommended, custom Page Types. I very rarely use editable text webparts.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Suneel Jhangiani answered on March 30, 2015 23:34

An intuitive way would be to either extend the Page Type or create a custom Page Type with the three additional fields (Heading, Subheading and Hero image). The editor would then be able to set these on the Form tab and you would be able to use a variety of web parts such as the Universal viewer for displaying the content formatted through a transformation.

1 votesVote for this answer Mark as a Correct answer

Yang Wen answered on March 30, 2015 23:50

Hmm we were instructed by our Official Kentico trainer that a page can be designed using either the Design tab OR the Form tab. Not a combination of the both tabs.

However it looks like my Standard Page Type is being designed in the Design Tab and the Title is being maintained in the Form tab. That contradicts what our trainer said. Your suggestion makes sense and I'll experiment with a custom page type.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.