Web Part Transformers – More than Meets the Eye

28
Accessible content is available upon request. Web Part Transformers D’arce Hess

Transcript of Web Part Transformers – More than Meets the Eye

Page 1: Web Part Transformers – More than Meets the Eye

Accessible content is available upon request.

Web Part Transformers

D’arce Hess

Page 2: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

@darcehess

https://www.linkedin.com/in/darcehess

[email protected]

D’arce Hess

Page 3: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Introduction

References

What is jsLink?Lists

Questions

Agenda

Code

Page 4: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

INTRODUCTION

Page 5: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

What we used to do

Page 6: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

SAID NO ONE EVER!

Page 7: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

• Easier to develop

• Easier than XSLT

• Can use jQuery to aid in

development across the

platform

• Use CSS to control look & feel

Enter Client-Side Rendering

Page 8: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

LISTS

Page 9: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Types of Lists

Lots of Options

• Generic Lists

• Document Libraries

• Announcements

• Events

• Tasks

• And many more

Page 10: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

• Lots of columns

• Doesn’t fit well in

small sections

Our Generic List

Page 11: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Why would we want to change it?

• Takes up too much space

on the page.

• Want a new look and feel

• Adds visual indicators to a

user about functionality.

Page 12: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Without altering the template

Page 13: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

You can only

use one script

per type of list

on a page.

Page 14: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

WHAT IS JSLINK?

Page 15: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Gives us the ability to

override the default list

template to create amazing

experiences

Page 16: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

The jsLink field is found in

the edit-mode menu for

the web part.

~sitecollection/SiteAssets/announcement.js

Page 17: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Where to store files

Page 18: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Where are the Display Templates?

Located in

_catalogs/masterpage

Page 19: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Also used in connection with Display Templates

Page 20: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

THE CODE

Page 21: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

What does the js look like?

Page 22: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Overriding the List Template

Page 23: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Page 24: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

DEMO

Page 25: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

REFERENCES

Page 26: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

Examples of ideas

List template IDs

References

Page 27: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.

QUESTION & ANSWER

Page 28: Web Part Transformers – More than Meets the Eye

© AvePoint, Inc. All rights reserved. Confidential and proprietary information of AvePoint, Inc. No part of this may be reproduced, stored in a

retrieval system, or transmitted in any form or by any means, without the prior written consent of AvePoint, Inc.