Custom pages | The Conference App | Forum

This forum requires Javascript to be enabled for posting content

 

Current User: Guest
Login
Members
Please consider registering

Lost Your Password?

Search Forums:

 










Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Custom pages

Reply to Post
Add a New Topic
No Tags
User Post

5:19 am
November 10, 2011

julien

Guest

Hi,

 

The conference program, speaker biographies and tweets looks gorgeous, but is there a way to add extra custom pages, such as logistics informations, access maps & so on ?

 

thanks

12:38 pm
November 11, 2011

Top Quark

Barrie, ON

Member

posts 177

Hi Julien,

It's possible to do just about anything.  The easiest place to add such extra pages is onto the About page.  The Conference App provides WordPress hooks to allow this.  You'll need to add some code to either an add-on plugin (my preference) or your functions.php file in your theme. 

Something like this:

add_filter('the_conference_app_about_pages','my_app_about_pages',1);
function my_app_about_pages($pages){
    $pages[] = array(
        'title' => 'My Extra Page',
        'card' => array(
            'xtype' => 'htmlpage',
            'content' => file_get_contents(dirname(__FILE__).'/the-app/my_extra_page.html')
        )
    );
    return $pages;
}

In this example, it takes the plain HTML contents of the file my_extra_page.html (in the `the-app` directory off of wherever directory the file containing this extra code lives) and puts it into an About page item called “My Extra Page”.

I find this the easiest method because it allows you to just create an HTML page for what you want.  If you have any images in the HTML page, and you're taking the app offline, you need to add those images to the manifest using the following hook:

add_action('the_conference_app_print_manifest','my_app_print_manifest');
function my_app_print_manifest(){
    echo 'http://mydomain.com/files/2011/11/my_image.jpg'."\n";
}

Make sense?

Cheers
Tq

1:52 pm
November 15, 2011

jujudellago

Guest

Yes thank you it seems pretty much straightforward. I prepared an offer for a client with a link to the demonstration, I hope he'll go fo it so I can try that out !

9:43 am
November 16, 2011

Top Quark

Barrie, ON

Member

posts 177

Hi Julien,

Awesome.  Hope it goes favourably!

Cheers
Tq

3:32 pm
May 10, 2012

PeterLundrigan

New Member

posts 1

Couple of questions….

 

Are there plans to allow add on pages to come right from site pages. So they are easy to update and maintain?

 

After using the code example above in the theme functions. Is there anything special to get the app to update. I refresh the app however, the new page button does not appear in about.

 

Pete

9:45 am
May 11, 2012

Top Quark

Barrie, ON

Member

posts 177

Hi Pete,

No immediate plans, but that's a good idea.  It can be achieved pretty easily with a slight modification to the above code:

 
add_filter('the_conference_app_about_pages','my_app_about_pages',1);
function my_app_about_pages($pages){
    $page = get_post( 123 ); // Gets post 123 - there are lots of ways to get the specific page you want
    $pages[] = array(
        'title' => 'My Extra Page',
        'card' => array(
            'xtype' => 'htmlpage',
            'content' => apply_filters('the_content',$page->post_content)  // using the apply_filters will process shortcodes
        )
    );
    return $pages;
}
 
No Tags
Reply to Post

Reply to Topic:
Custom pages

Guest Name (Required):

Guest Email (Required):

Smileys
Confused
Cool
Cry
Embarassed
Frown
Kiss
Laugh
Smile
Surprised
Wink
Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
8 + 11
   

© Simple:Press