Jump to content


Photo
- - - - -

Custom Sections: Defining Workswith


  • Please log in to reply
7 replies to this topic

#1 thomed

thomed

    Member

  • Members

  • 15 posts

Posted 18 December 2011 - 05:35 PM

I just started playing with Sections; starting with the Developer Kit example Section (PullQuote). I've been able to tweak and change the way it behaves. The Section activates without errors/glitches. I am able to add my new Section to my Tag Page - but it only appears to be usable when I place it in the 'Page Templates'. I want to place it right at the top of the Content Area. Unfortunately when I select 'Content Area' in my Drag&Drop Template builder UI my new Section becomes unavailable. How do I target my section to work in the Content Area? I'm guessing it's to do with the Workswith definition?

#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 18 December 2011 - 05:39 PM

try Workswith: main

#3 thomed

thomed

    Member

  • Members

  • 15 posts

Posted 18 December 2011 - 06:13 PM

Works perfectly! Is there a list of the available Workswith values that can be used?

#4 jankowalski

jankowalski

    Advocate

  • Members
  • 346 posts
  • Country: Country Flag

Posted 13 May 2012 - 05:20 PM

the same question..

#5 johnny_n

johnny_n

    Member

  • Members

  • 26 posts
  • Country: Country Flag

Posted 25 May 2012 - 08:57 PM

This would indeed be helpful!

#6 greggsky

greggsky

    Advanced Member

  • Members

  • 77 posts

Posted 26 June 2012 - 12:07 PM

I'm working with the Base Section (pullquote) template and have had no problem get it to work at the Template level. But when I change it to "Workswith: main" it still only appears at the Template level. Is there something more to this setting? Furthermore, my "Section: Name" portion of the section doesn't change the name of my section in the Drag & Drop area of the admin. Could it be there is something buggy with 2.2.1? I'm really confused. I've tried cutting and pasting other sections code, which almost worked, the section appeared under drag and drop but not on the front-end. Frustrating

Below is the code and the resulting screenshots:

/*
Section: Hub Dashboard
Author: Greggsky
Author URI:

Please Login or Register to see this Hidden Content


Description: Interoccupy Hub Dashboard interface
Class Name: HubDash
Workswith: main
*/

class HubDash extends PageLinesSection {


Posted Image
Posted Image

#7 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 26 June 2012 - 02:16 PM

Try workswith: templates, main If you want it to appear everywhere; Workswith: templates, main, header, footer, morefoot Nick

#8 greggsky

greggsky

    Advanced Member

  • Members

  • 77 posts

Posted 26 June 2012 - 09:21 PM

I had tried that...and tried it again. The section appears on headers, morefoot, page templates, just not anything on the content side.