Jump to content


Photo
- - - - -

hooks - how to...


  • Please log in to reply
8 replies to this topic

#1 oinegue1960

oinegue1960

    Super Member

  • Members
  • 117 posts
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 27 March 2012 - 08:50 PM

Hello, I searched about hooks either in forum or in docs but I did not find useful examples to users who are not familiar to php coding like me. I appreciate the support of moderators and 'pro' users of course but what I have found are links to 'pagelines api list' and it's a bit difficult for me to consider such links as 'helpful' because it's oriented to prepared in coding users. In my modest opinion 'helpful' would mean something you can 'to copy and paste' or 'to drag and drop'... the 'core' of Pagelines features which attracted me to purchase a 'premium' theme. Anyboby has some Pagelines 'ready to use' hook to share? thanks

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3252 posts
  • LocationSan Francisco, CA
  • Framework Version:2.3
  • Country: Country Flag

Posted 27 March 2012 - 10:24 PM

Sure, well hooks are really where you start to get into 'heavy' customization. While you can do a lot w/ PL using drag and drop; sometimes hooks are the best way to do something totally unique. (We can't possibly design to do everything w/ drag and drop out of the box; so we rely extensions and hooks to fill the gaps) I guess, the first question is, what are you trying to accomplish?

#3 oinegue1960

oinegue1960

    Super Member

  • Members
  • 117 posts
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 27 March 2012 - 11:12 PM

Basically my need comes from the header is the same for all pages.
Maybe I'm wrong but it seems I can customize only 'page template' section by using 'drag and drop' feature.
I'm very new to Pagelines 'logics' but I'd like to have more page templates (with its own customized header) to choose where I create a new page in WP.
That's why I guess the use of hooks could help me to create some customized page templates.
Of course I followed the docs where they explain how to create a new page template by page.example.php or page.base.php but I always get the odd of 'shared' header.
Beside that I have to point (maybe) an issue which prevents me to have full control of the header, as I do not have 'brandnav' section available in template's settings.
That's strange as I have activated it in 'section' area.
Thanks Arpower

#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 28 March 2012 - 02:52 AM

Since the header is universal, it appears on all pages as the same (because technically, a page can only have one header). What kind of customization are you trying to achieve with your header? Are you trying to add an image or text or some other kind of content?

#5 oinegue1960

oinegue1960

    Super Member

  • Members
  • 117 posts
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 28 March 2012 - 10:23 AM

I'm still on the projecting phase of the website so I did not established the definitive list of customizations. (where needed) Let say I know the mainstream of contents and how to 'group' them. From that assessment the website would be designed this way: Landing page (default template - without 'brandnav') Incoming contents (customized_template_1- with 'brandnav') Outgoing contents (customized_template_2 - with 'brandnav') Info & contatcs (default template - without 'brandnav') How to customize brandnav is up to a following study but the first need is to 'have' brandnav in the header of customized templates. That's why I'm thinking about 'hooks' to place brandnav in the header of specific pages only.

#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 28 March 2012 - 06:46 PM

To the very best of my 6 years working with WordPress, what you're trying to do is not likely to happen as described. You can however, use the PageLines Meta Settings on each page or post to hide things like BrandNav. But to hide for incoming vs. outgoing will require extreme custom coding which is not supported in the forum. Please consider hiring a developer or one of our Pros, if this is even possible.

Please Login or Register to see this Hidden Content



#7 oinegue1960

oinegue1960

    Super Member

  • Members
  • 117 posts
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 28 March 2012 - 10:35 PM

Hi rangelone,
your reply sounds so 'drastic' to me that I presume I could be misunderstood.
Maybe my basic english doesn't help to express me. I'm sorry.
The dynamic of 'incoming' or 'outgoing' contents do not involve theme functions, it's just a description of contents I'll write down those pages: 'incoming' are contents I'll get from 'artists' profiles or productions or communications, 'outgoing' is entertainment produced by my internet radio and webtv.
That's it. Nothing to share with customized functions.
To build 'those' pages I'd like to use a template with 'Brandnav' in the header instead of 'Branding' and 'Navigation'.
Maybe I'm wrong but it doesn't seem to be so extreme custom coding to involve a developer or a Pro.

As I wrote 'Brandnav' doesn't show in my meta settings even if activated it in the store (maybe an issue? maybe a bad installation?...I don't know...maybe someone could help me to solve such problem) so I'm thinking to use an hook to 'recall' it.
Hope this time I expressed myself better. :)
If not please tell me as I'll try to use other words. (something tells me it's time to improve my poor english...;o))))

#8 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 29 March 2012 - 02:29 AM

Regarding the brandnav issue, did you try deactivating your active plugins?

#9 oinegue1960

oinegue1960

    Super Member

  • Members
  • 117 posts
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 29 March 2012 - 08:05 AM

Hi Catrina, I solved it 'overnight'...:))) I manually copied brandnav dir into /plugins/pagelines-section dir and then refreshed the store. Now template's meta setting displays 'brandnav section' and I can use it without 'hooks'. I guess my need in object has been a bit misunderstood so nobody helped me. Thanks for your kindest reply :)