Archived

This topic is now archived and is closed to further replies.

  • 0

Adding a section meta setting to page content


Question

Posted · Report post

We have a custom header section with with a meta setting for phone number.  The section has a site wide default number and the specific pages can change their meta setting for the phone.  

 

Now we want to use the header meta setting in the content in the page and/or in the content of other custom sections.  What would be your recommendation for accomplishing this?

Share this post


Link to post
Share on other sites

6 answers to this question

Posted · Report post

Well I've ended up resolving it with a jQuery rewrite of the content from our custom header into the body copy which is working fine though dependent on client side support.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

Download the Content Box (if you don't have it already installed) from the Dashboard > PageLines > Store > Sections and apply it via Dashboard > PageLines > Drag & Drop.

 

You can then add the code for your phone number on a page basis or global, via Dashboard > PageLines > Page Options

Share this post


Link to post
Share on other sites

Posted · Report post

I'll check that out.  Thanks.

Share this post


Link to post
Share on other sites

Posted · Report post

Ok, that's basically a blank section.  Handy, but not for what I need.

 

I need to be able to use a plotion from a custom section (the header section we've made) within the main content of the page.  The header and footer share a ploption for the phone number and this plotion can be over-ridden in the specific pages if those pages need a specific different number.  

 

Now, the page creators need to put either the site default phone number or the page specific number within the copy in the page, in the content in the editor window.  So what I'm asking for is a short code that can be inserted in the main editor or some way to pull the ploption and output it within the content.

 

I don't need a new blank section like the Content Box as the number has to do within the flow of the text in the header and footer as well as in the content that the page creators are writing.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi there,

 

I'm not sure I'm following the thread 100%, but from what I've understood you've already made a custom section and you want to take some data thats being used in that sections meta and then put that into the content area?

 

If you've set it up as a shortcode you can use a hook to print the shortcode into the relevant area in the content. See Matt's reply on this thread - http://www.pagelines.com/forum/topic/22966-how-to-pop-a-modal-from-a-hook/?hl=add_action#39;the_hook_you_want_to_use

Share this post


Link to post
Share on other sites

Posted · Report post

I'm glad you were able to resolve this.

Share this post


Link to post
Share on other sites