ddr jquery
play

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


  1. DDR & jQuery More than just hover & dropdown Lee Wise / Front End Developer @theleewise Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  2. 10 Pound Gorilla Team Everything DNN Everything Else • Skins • Internet Marketing • Modules • Web Development • Development • Graphic Design • Consulting • SEO • Social Media Marketing • Adwords • Online Marketing • Email Marketing Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  3. What ’ s so great about DDR? • 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 Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  4. Why are templates so great? Create it exactly It can always be Use many jQuery how you need unique & different plug-ins (Even if they weren ’ t originally for DNN and DDR Menu) Don ’ t forget to include #DNNCon in your tweets! @DNNCon

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

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

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

  8. DDR Templates How-To Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  9. What ’ s Needed 1. Manifest (XML) 2. Template (TXT, XSLT, or Razor) 3. Styles (CSS) 4. Scripts (JS) Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  10. Where is all this? 1. Container (action menus only) 2. Skin 3. Portal Root 4. DesktopModules/DDRMenu 5. Application Root Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  11. Manifest (XML) Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  12. Scripts & Styles This defines the paths of JavaScript ’ s file to import. This defines the paths of CSS files to import. Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  13. Scripts & Styles (Cont) [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. Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  14. Available Attributes • The page ID • Whether the page is the first in its level • The page name (i.e. what should normally be • Whether the page is the last in its level displayed in the menu) • Whether the page is the only one in its level • The full page title • The depth of the current page in the menu • The page URL structure (starting at 0) • Whether the page is enabled • The target window for the URL defined for the page (_new or null); DNN 7.1+ • Whether the page is selected • The keywords defined for the current page • Whether the page is in the current breadcrumb • The description of the current page • Whether the node is a separator • A child node of this node • The URL of the page icon • The URL of the large page icon (DNN 6 only) <li class= “ @first @last @enabled ” id= “ nav-page- @id ” > *Simplified Example, Non-working code. Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  15. 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 Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  16. What ’ s So Special? Using Template & Client Options from DDR Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  17. Template Arguments 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. 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 <xsl:if test="($firstClass) and (@first = 1) ” > <xsl:value-of select="$firstClass" /> </xsl:if> Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  18. Options in Manifest Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  19. Options on Module Module options are set through the standard module settings. Template arguments and client options should be supplied as one or more lines in Setting=Value format. Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  20. Options in Skin Object Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  21. Client Options 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. Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  22. Client Options in the template (Tokens) Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  23. Client Options in the template (XSLT) Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  24. Resources • 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 Don ’ t forget to include #DNNCon in your tweets! @DNNCon

  25. THANKS TO ALL OF OUR GENEROUS SPONSORS! Don ’ t forget to include #DNNCon in your tweets! @DNNCon

Recommend


More recommend