DDR & jQuery More than just hover & dropdown Lee Wise / - - PowerPoint PPT Presentation

ddr jquery
SMART_READER_LITE
LIVE PREVIEW

DDR & jQuery More than just hover & dropdown Lee Wise / - - PowerPoint PPT Presentation

DDR & jQuery More than just hover & dropdown Lee Wise / Front End Developer @theleewise Don t forget to include #DNNCon in your tweets! @DNNCon 10 Pound Gorilla Team Everything DNN Everything Else Skins Internet


slide-1
SLIDE 1

@DNNCon Don’t forget to include #DNNCon in your tweets!

DDR & jQuery

More than just hover & dropdown

Lee Wise / Front End Developer @theleewise

slide-2
SLIDE 2

@DNNCon Don’t forget to include #DNNCon in your tweets!

10 Pound Gorilla Team

Everything DNN

  • Skins
  • Modules
  • Development
  • Consulting

Everything Else

  • Internet Marketing
  • Web Development
  • Graphic Design
  • SEO
  • Social Media Marketing
  • Adwords
  • Online Marketing
  • Email Marketing
slide-3
SLIDE 3

@DNNCon Don’t forget to include #DNNCon in your tweets!

  • Simple upgrade for standard SolPartMenu and DNNMenu.
  • Helps with SEO
  • Works on mobile and accessible browsers.
  • Allows server-side alteration or replacement of the menu

structure.

  • Can display a subset of pages, e.g. top-level only, children of

current page, etc

  • Can be used as either a module or a skin object.
  • Can be templated to produce any HTML you want.
  • Automatically detects and uses Apollo, Ealo and Adequation

page localization

What’s so great about DDR?

slide-4
SLIDE 4

@DNNCon Don’t forget to include #DNNCon in your tweets!

Create it exactly how you need

Why are templates so great?

It can always be unique & different Use many jQuery plug-ins

(Even if they weren’t

  • riginally for DNN and

DDR Menu)

slide-5
SLIDE 5

@DNNCon Don’t forget to include #DNNCon in your tweets!

slide-6
SLIDE 6

@DNNCon Don’t forget to include #DNNCon in your tweets!

slide-7
SLIDE 7

@DNNCon Don’t forget to include #DNNCon in your tweets!

slide-8
SLIDE 8

@DNNCon Don’t forget to include #DNNCon in your tweets!

DDR Templates

How-To

slide-9
SLIDE 9

@DNNCon Don’t forget to include #DNNCon in your tweets!

What’s Needed

1. Manifest (XML) 2. Template (TXT, XSLT, or Razor) 3. Styles (CSS) 4. Scripts (JS)

slide-10
SLIDE 10

@DNNCon Don’t forget to include #DNNCon in your tweets!

  • 1. Container (action menus only)
  • 2. Skin
  • 3. Portal Root
  • 4. DesktopModules/DDRMenu
  • 5. Application Root

Where is all this?

slide-11
SLIDE 11

@DNNCon Don’t forget to include #DNNCon in your tweets!

Manifest (XML)

slide-12
SLIDE 12

@DNNCon Don’t forget to include #DNNCon in your tweets!

This defines the paths of JavaScript’s file to import. This defines the paths of CSS files to import.

Scripts & Styles

slide-13
SLIDE 13

@DNNCon Don’t forget to include #DNNCon in your tweets!

[MANIFEST]/filename: In the folder containing the menu manifest (e.g. ~/Portals/0/skins/MySkin/MyTemplate/filename) [SKIN]/filename: In the current skin folder (e.g. ~/Portals/0/skins/MySkin/filename) [DDRMENU]/filename: In the DDRMenu folder (i.e. ~/DesktopModules/DDRMenu/filename) [PORTAL]/filename: In the portal root (e.g. ~/Portals/0/filename) [DNN]/filename: In the DNN application root (i.e. ~/filename) ~/filename: In the DNN application root.

Scripts & Styles (Cont)

slide-14
SLIDE 14

@DNNCon Don’t forget to include #DNNCon in your tweets!

  • The page ID
  • The page name (i.e. what should normally be

displayed in the menu)

  • The full page title
  • The page URL
  • Whether the page is enabled
  • Whether the page is selected
  • Whether the page is in the current breadcrumb
  • Whether the node is a separator
  • The URL of the page icon
  • The URL of the large page icon (DNN 6 only)
  • Whether the page is the first in its level
  • Whether the page is the last in its level
  • Whether the page is the only one in its level
  • The depth of the current page in the menu

structure (starting at 0)

  • The target window for the URL defined for the

page (_new or null); DNN 7.1+

  • The keywords defined for the current page
  • The description of the current page
  • A child node of this node

Available Attributes

<li class=“@first @last @enabled” id=“nav-page- @id”>

*Simplified Example, Non-working code.

slide-15
SLIDE 15

@DNNCon Don’t forget to include #DNNCon in your tweets!

Additional Attributes for Razor

  • The parent node of this node
  • The ASP.NET control ID of the current DDRMenu instance
  • The path of the DNN application root
  • The path of the menu template's manifest folder
  • The path to the current portal root
  • The path to the current skin
slide-16
SLIDE 16

@DNNCon Don’t forget to include #DNNCon in your tweets!

What’s So Special?

Using Template & Client Options from DDR

slide-17
SLIDE 17

@DNNCon Don’t forget to include #DNNCon in your tweets!

Arguments to be passed into the template. For an XSLT template, these will be template parameters. For a Razor template, they are passed in as members of the Model object. For a token template, they are accessible by name.

Template Arguments

<xsl:if test="($firstClass) and (@first = 1)”> <xsl:value-of select="$firstClass" /> </xsl:if>

Here, $firstClass is a template argument so the class that is used to indicate if the node is first can be easily set without access to the code

slide-18
SLIDE 18

@DNNCon Don’t forget to include #DNNCon in your tweets!

Options in Manifest

slide-19
SLIDE 19

@DNNCon Don’t forget to include #DNNCon in your tweets!

Module options are set through the standard module settings. Template arguments and client options should be supplied as

  • ne or more lines in Setting=Value format.

Options on Module

slide-20
SLIDE 20

@DNNCon Don’t forget to include #DNNCon in your tweets!

Options in Skin Object

slide-21
SLIDE 21

@DNNCon Don’t forget to include #DNNCon in your tweets!

Client options are name/value pairs that can be passed as a JSON object to jQuery plug-ins and most other JavaScript menus. They are given to the template as an argument called Options that can then be passed on to the client-side code.

Client Options

slide-22
SLIDE 22

@DNNCon Don’t forget to include #DNNCon in your tweets!

Client Options in the template (Tokens)

slide-23
SLIDE 23

@DNNCon Don’t forget to include #DNNCon in your tweets!

Client Options in the template (XSLT)

slide-24
SLIDE 24

@DNNCon Don’t forget to include #DNNCon in your tweets!

  • https://github.com/10-Pound-Gorilla/DNNCON-16-DDR-and-jQuery
  • http://www.dnnsoftware.com/wiki/Page/DDRMenu-user-guide
  • http://www.dnnsoftware.com/wiki/Page/DDRMenu-token-templates
  • http://www.dnnsoftware.com/wiki/Page/DDRMenu-reference-guide

Resources

slide-25
SLIDE 25

@DNNCon Don’t forget to include #DNNCon in your tweets!

THANKS TO ALL OF OUR GENEROUS SPONSORS!