custom fields in joomla - joomladay uk 2016 - marco dings

35
Marco Dings Custom fields 4 Joomla Joomla! Day UK 2016 London, Cardinal palace Februari 13 th 2016 J3.?

Upload: virya-group-limited

Post on 15-Apr-2017

376 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Marco Dings

Custom fields 4 Joomla

Joomla! Day UK 2016London, Cardinal palaceFebruari 13th 2016

J3.?

Page 2: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

About me

Marco Dings ( PLT )@mdingsJ!4 Project ManagerCTO Virya Group

Page 3: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Conception

From DPFields to “JFields”

JFields does not exist yet ( J3.? )Based on and compatible with DPFields

Contributed by Digital PeakAllon Moritz

Page 4: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Benefits of Custom Fields

Add user defined data elements, fields to content elements

Extend standard Joomla extensionsUsers, Articles and Modules

Custom visualisation of Fields, where and how

Support Joomla compliant extensions out of the box

Page 5: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Custom Fields Joomla basics

Searchable

Multilingual

Custom extensions can be extended with custom fields

Page 6: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Why Custom Fields

Extend content in simple way

Display content consistently, and customised

Support Joomla compliant extensions out of the box

Custom extensions can be extended with custom fields

Page 7: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

What’s in it for me?

Extend user profile with

AvatarCountryTelephone

Page 8: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

What’s in it for me?

Display user-fields in article based on author

Page 9: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

What’s in it for me?

files

youtube video by id

urls

mysql…

What would you like to add

Page 10: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Custom Fields characteristics

Fields similar (not yet “extended” from Joomla core)

Still difficult to add your own fields

Flexible standard visualisation using backend GUI

Custom visualisation requires “templating skills”

Page 11: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Available fields

Current selection

MediaArticleRadioSqlTelephoneTextTextareaTimezoneUrl

CalendarCaptchaCheckboxesColorEditorEmailImageIntegerList

UserUsergroupYes NoDPCalendar Cal-endar

Page 12: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Installation

While not in Joomla core get it from https://joomla.digital-peak.com/download/dpfields

Page 13: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Configuration

PluginHide components

Default visualisation

Page 14: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Configuration

(Default) visualisation

After title

Before content

After content

Page 15: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Fields and Field Categories

Fields ( hold your data )

Field Categories are used to group fields for input, appear as named tabswith the item

Page 16: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Fields

Fields displayed sequentially

No conditional fields

Page 17: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Field Categories

One Tab per Field Category

Tab named after Field Category

One or more tabs

Page 18: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

When fields are displayed

Categorie and TagsFields can be assigned to

Categories ( multiple )

Tags

Fields will only show in the defined context of category or tags

Page 19: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Where to display

Basic Layout

Editor Button

Advanced

Page 20: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Basic Layout

After Title

Before Content

After Main

none

Page 21: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Editor Button

Page 22: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Editor Button

Use editor plugin

Will open list with fields

Page 23: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Editor Button

Select field

Code gets inserted

{{#dpfields id=9}}{{value}}{{/dpfields}}

Page 24: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Portability

{{#dpfields id=9}}{{value}}{{/dpfields}}

Should be using fieldname iso id value for portability of con-tent

Same fields in different installations could have different id’s

Use alias{{#dpfields alias=avatar}}{{value}}{{/dpfields}}

Page 25: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Advanced display options

Changing appearances• Template overrides

• Alternate layouts

• Jlayout

Page 26: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Template overrides

Change the default behaviour of contenthttps://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Hoe the article, blog .. shows for your template

Create via the backend

Templates/[templatename]/html/…

Page 27: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Alternate layouts

Add alternate layout

NO backend GUI

In addition to Template overrides

Can be selected for the content in article, menu definition

Change the default behaviour of contenthttps://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Page 28: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Combining with other Overcome limitations with 3rd party

Articles anywhere

{articles cat:bedrijven}{layout:bedrijven}{/articles}

Blog layout with article alternate layouts

Page 29: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

JLayouts

Building blocks of views https://docs.joomla.org/J3.x:Sharing_layouts_across_views_or_extensions_with_JLayout

Title

Pagination

Readmore

Fields

Page 30: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

JLayouts template overrides

templateAdd you layouts to

Templates/[templatename]/html/…

Page 31: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

JLayouts components overrides

Have different fields representation per componentThe same Field-type could have a different representation for users as opposed to articles

Templates/[templatename]/html/component/[

Page 32: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Code snippitsSamples of code to use in your overrides

More and downloadable content from

http://viryagroup.com

Page 33: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Code snippits

Image in article

Page 34: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings

Code snippits

Use aliases instead of id’s

Simply map them once

Use your own JLayouts

Page 35: Custom Fields in Joomla - JoomlaDay UK 2016 - Marco Dings