Jump to content
carldavaz

My first simple PageLines "section": API question...

Recommended Posts

carldavaz
Here's my code. Long story short, I needed a full width, widgetized, area to show in the header and footer my PageLines template. The code above is duplicate of "sb_fullwidth" section. I have implemented my new sections and they are showing text widgets that contain my javascript ad code. This is perfect! I can definitely see the power of sections and widgets now that I've had a little time to play with this stuff. My question is: These API methods:
pagelines_standard_sidebar()
	pagelines_register_sidebar()
	pagelines_draw_sidebar()
Since this is not a "sidebar" element, is there a more generic method that I can call that's not related to "sidebar"? When I view HTML source of my "footer" bottom leaderboard section/widget, I see:

(Note the "sidebar_widgets" class) Again, this is not a sidebar element. It's just a generic, full-width, always there, static header/footer element. In other words, the sections I have built are specifically for the "header" and "footer" areas and not the sidebar... I guess I am wondering if there's a better method that I can call that is more closely related to the functionality of my custom section? Does that make sense? :D I've looked at the API docs here and here, but I did not see any methods that I thought would suit my needs. P.S.: I can't wait to learn more about sections... Eventually it would be nice to share some of my "section" creations with others, I just need to learn more about the PageLines API. Thanks! Micky

Share this post


Link to post
Share on other sites
Rob
Micky, I apologize, but I'm not a developer and your questions are really development/customization related. Have you seen http://www.pagelines.com/wiki/Developer_Docs ? Let me know if those docs help or not, and if necessary, I'll try to bump this to someone up the ladder.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob
You might also wish to sign up as a developer where you can get support for questions like this. Visit http://developer.pagelines.com and register there.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
carldavaz
Thanks rangelone! I really appreciate your help. I did check out the docs (and the YouTube video series); the docs appear to be a work in progress and the YouTube videos were very informative, but the part about section building did not cover the questions I presented in my first post. Thanks for the tip on the developer registration, that might do the trick. I wonder if there's a PageLines e-mail list I could get on? Anyway, thanks!!! Cheers, Micky

Share this post


Link to post
Share on other sites
carldavaz
Just to update this thread. I asked the WP-hackers e-mail listserv about "register_sidebar()" WP function (I asked if the name "sidebar" was throwing me off), and here's an informative reply from Dion: [quote]Basicallly, Widget Area's used to be pretty much only sidebars.. and so, the name register_sidebar() was used inline with the other *_sidebar() functions. use register_sidebar() to register a "Widget Area", be that a footer, header, sidebar, 2nd sidebar, below-post-widget-area, or perhaps a pop-over ad-widget-sidebar (that luckely i've never seen...) so yes, It's just the name throwing you.[/quote] Looks like I am good to go then. :D

Share this post


Link to post
Share on other sites
carldavaz
One last thing, maybe this will help others, but this [url="http://phpxref.pagelines.com/nav.html?sections/sb_fullwidth/section.php.source.html#l21"]PageLines source code viewer[/url] really helped me pick apart and follow/understand the code (it's nice to be able to click on functions and follow the path to the other bits of code).

Share this post


Link to post
Share on other sites
carldavaz
I've updated my code: [url="https://gist.github.com/1887065"]https://gist.github.com/1887065[/url] The old version of the code can be found here: [url="https://gist.github.com/1887065/6907e03e9c4fa3be39054179d5c49e05e3cd62c0"] https://gist.github.com/1887065/6907e03e9c4fa3be39054179d5c49e05e3cd62c0[/url] Note: I am using the PageLines base child theme to add my new sections. In the most recent version of my code, that's a section that will just output the content of the widget and nothing else. The built-in PageLines methods were generating
    s and
  • s and such, which I did not want. FYI: I am using the above sections for a top and bottom ad leaderboard. I use the PageLines "Templates" section to setup the section on the template, and then I add a widget via the "Appearance >> Widgets" section. For more info, the [url="http://www.youtube.com/playlist?list=PLA7B65B6E4ACDCD90"]YouTube dev videos[/url] will explain things pretty well. Hopefully that helps others. Cheers, Micky

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×