Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
workflow advice.
#1
Hi folks.

I have a site I'm currently working on that requires a lot of tables (data etc.) on a particular page.

I set the page up with 4 tabbed content sections for the sake of usability. Each tab loads in a hidden div . This works nicely, however there is a lot of information in each section. This makes for a page with a lot of code in the editor. EEK

I was wondering if the function returnPageContent could be used in a template file to make it more modular so I don't have to do a boat load of div's etc on the page. Can they be ported in?

PHP Code:
<?php returnPageContent(); ?>

So for example. In a particular template file I could create the outer sections to hold each tabbed content. Where the arguments could be separate pages.

PHP Code:
<div id="section"><?php returnPageContent('fund-information'); ?></div>

<div id="section"><?php returnPageContent('fund-strategy); ?></div>

<div id="section"><?php returnPageContent('
fund-risk'); ?></div> 

Thanks in advance. Any advice would be greatly appreciated!!
Reply
#2
(2013-08-28, 01:22:31)lnickel Wrote: Hi folks.

I have a site I'm currently working on that requires a lot of tables (data etc.) on a particular page.

I set the page up with 4 tabbed content sections for the sake of usability. Each tab loads in a hidden div . This works nicely, however there is a lot of information in each section. This makes for a page with a lot of code in the editor. EEK

I was wondering if the function returnPageContent could be used in a template file to make it more modular so I don't have to do a boat load of div's etc on the page. Can they be ported in?

PHP Code:
<?php returnPageContent(); ?>

So for example. In a particular template file I could create the outer sections to hold each tabbed content. Where the arguments could be separate pages.

PHP Code:
<div id="section"><?php returnPageContent('fund-information'); ?></div>

<div id="section"><?php returnPageContent('fund-strategy); ?></div>

<div id="section"><?php returnPageContent('
fund-risk'); ?></div> 

Thanks in advance. Any advice would be greatly appreciated!!


I think this can be done. I'll give it a go.
Reply
#3
Yes or use a customfields or specialpages plugin.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
It should be getPageContent
Reply
#5
Thank you Carlos!
Reply
#6
Why not the theme function
get_page_content ?

Is it because it calls the filters and actions over and over ?
Should we add a flag to it, since it would be the preffered function to use in a template.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
lnickel wanted to insert content from other pages, like wysiwyg blocks. The typical use for getPageContent.
Reply
#8
oh yeah, slugs doh. It seems to be an often used design. Maybe we need a theme function for get_slug_content or something. Probably not, i guess that is more of a programing design.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
...or maybe get_page_content('slug')
(if no parameter, use current page slug.)
Reply




Users browsing this thread: 2 Guest(s)