Posted 20 May 2013 - 04:45 PM
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?
Posted 20 May 2013 - 04:55 PM
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
Posted 20 May 2013 - 09:25 PM
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.
Posted 20 May 2013 - 11:49 PM
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 -
Posted 23 May 2013 - 03:53 PM Best Answer
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.