Some methods on NavController allow for customizing the current transition. To do this, we can pass an object with the modified properites.
PropertyValueDescription
animatebooleanWhether or not the transition should animate.
animationstringWhat kind of animation should be used.
directionstringThe conceptual direction the user is navigating. For example, is the user navigating forward, or back?
durationnumberThe length in milliseconds the animation should take.
easingstringThe easing for the animation.
The property 'animation' understands the following values: md-transitionios-transition and wp-transition.


Ionic NavOptios

html

{{ child.name }}

{{ child.information }}

{{ item.name }}

{{ item.information }}
css
 .accordion-list { background: color($colors, light); height: 100%; } .section { background: #fff; color: #000; margin-bottom: 4px; } .section-active { background: #ffc400; color: #fff; } .child { background: #e8e7e6; color: #000; margin-bottom: 4px; } .child-item { background: #f3f2f1; padding: 10px; } .label { margin: 0px; } .list { margin-bottom: 4px; }
 ts
 constructor(public navCtrl: NavController, public navParams: NavParams) { let data = { "items": [ { "name": "Action", "children": [ { "name": "Special Academy Pizza", "information": "Pastrami pork belly ball tip andouille corned beef jerky shankle landjaeger. Chicken chuck porchetta picanha, ham brisket tenderloin venison meatloaf landjaeger jowl.", "price": "$25" }, { "name": "Pizza Ionic", "information": "Pork chop meatloaf rump, meatball shoulder turducken alcatra doner sausage capicola pork strip steak turkey cupim leberkas.", "price": "$19.99" } ] }, { "name": "Pizza", "children": [ { "name": "Traditional", "children": [ { "name": "Pizza Salami", "information": "Pork chop jowl capicola porchetta, kielbasa prosciutto boudin bacon pork pig.", "price": "$10" }, { "name": "Pizza Prosciutto", "information": "Pork chop pastrami landjaeger chuck brisket", "price": "$12" } ] }, { "name": "Gourmet", "children": [ { "name": "Pizza Bombay", "information": "Pastrami ham hock ball tip, tongue ribeye chuck ham beef bresaola leberkas.", "price": "$13" }, { "name": "Pizza Crazy Dog", "information": "Andouille spare ribs meatloaf swine ground round pork loin, brisket chuck bacon tongue.", "price": "$14" }, { "name": "Pizza Italia", "information": "Ribeye ham t-bone, tail ground round biltong picanha sausage rump corned beef.", "price": "$11" }, { "name": "Pizza Tuna", "information": "Pork chop pastrami landjaeger chuck brisket", "price": "$14" } ] }, { "name": "Bestseller", "children": [ { "name": "Pizza Academy", "information": "Frankfurter tail capicola cupim shankle salami, beef ribs beef boudin porchetta ball tip leberkas turkey tenderloin.", "price": "$25" }, { "name": "Pizza Ionic", "information": "Shank chuck tail, kevin shankle ham hock pork loin pork hamburger beef ribs.", "price": "$19.99" } ] } ] }, { "name": "Drinks", "children": [ { "name": "Special Academy Pizza", "information": " Landjaeger fatback shank frankfurter, tongue shoulder ham strip steak pancetta pork short loin corned beef short ribs biltong cow", "price": "$25" }, { "name": "Pizza Ionic", "information": "Pork chop pastrami landjaeger chuck brisket", "price": "$19.99" } ] } ] }; this.information = data.items; } toggleSection(i) { this.information[i].open = !this.information[i].open; } toggleItem(i, j) { this.information[i].children[j].open = !this.information[i].children[j].open; } ionViewDidLoad() { console.log('ionViewDidLoad AboutPage'); }

The HTML

We need two divs, one of them is the container and the other wraps the text:
<div id="container">
    <div class="content">
        Your text goes here
    </div>
</div>
Replace the dummy text with your own.

The CSS

The CSS will point to the two elements from the previous step:
#container {
    display: table;
    height: 400px;
    margin: 0 auto;
    width: 400px;
}
.content {
    background: #f2f2f2;
    padding: 40px;
    text-align: center;
    display: table-cell;
    vertical-align: middle;
}
As you can see, we use properties to "emulate" a table. We use display: table for the container, and display: table-cell, plus also vertical-align: middle for the text wrapper.
Optional: you can customize the values for these properties:
  • background
  • padding
  • text-align

The end result

Preview the result to see the text is perfectly centered vertically:

How to Align Text Vertically with CSS

global $post;
$args =  array( 
            'posts_per_page' => 5,
            'post_type' => array('estate_property')
        );
$prop_selection =   new WP_Query( $args);
if ( $prop_selection->have_posts() ) {

    // Start looping over the prop_selection results.
    while ( $prop_selection->have_posts() ) {

        $prop_selection->the_post();
        // the_id();
        // echo '<br>';
        // the_title();
        // echo '<br>';
        // $categories = get_the_category();
        // var_dump($categories);
        $id = get_the_ID();
        $terms = get_the_terms( $id, 'property_category' );
        // $terms = get_terms([
        //     'taxonomy' => $taxonomy,
        //     'hide_empty' => false,
        // ]);
        // var_dump($terms);
        // the_slug();
        var_dump($post->post_name);
        echo '<br>';
        $terms_slugs = array();

        foreach( $terms as $term ) {
            $terms_slugs[] = $term->slug; // save the slugs in an array
        }
        var_dump($terms_slugs);
        echo '<br><br>';
        /*$search_arguments =  get_post_meta($id, 'search_arguments', true) ;
        var_dump($search_arguments);
        echo '<br><br>';
        // $search_arguments_decoded= (array)json_decode($search_arguments,true);

        $meta_arguments =  get_post_meta($id, 'meta_arguments', true) ;
        var_dump($meta_arguments);
        echo '<br><br>'; */
        // $meta_arguments = (array)json_decode($meta_arguments,true);

        // var_dump($prop_selection);
        // $meta = get_post_meta( get_the_ID() );
        // var_dump($meta);

        // Contents of the queried post results go here.

    }wp_reset_postdata();

}

wp_query

- Copyright © Bongvireak - Blogger Templates - Powered by Blogger - Designed by Johanes Djogan -