Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tips and Trick for Migration from V3 to V4 #120

Open
crochefort opened this issue Apr 2, 2014 · 2 comments
Open

Tips and Trick for Migration from V3 to V4 #120

crochefort opened this issue Apr 2, 2014 · 2 comments

Comments

@crochefort
Copy link
Contributor

This will be to help @upsonp to create a page in the Wiki to help user to deal with the issue for the migration.

The class span-* is no longer in V4 ... it's has been replace with col-md* ... this is a case-by-case situation.

The config path at the top of file need to be changed ( search and replace all )
from this

$_CONFIG_PATH = $_SERVER['DOCUMENT_ROOT'] . "/templates";
require_once $_CONFIG_PATH ."/config.php";

to this

$_PAGE_PATH_ = realpath(dirname(__FILE__));

require_once $_PAGE_PATH_ . "/_config/config.php";

Please not this was my personnal configuration... you can use what ever you want.

The left menu has change.

from

<section>
<h3><a href="/contact-en.php">Contact Us</a></h3>
    <ul>
        <li><a href="/contact-en.php?id=01">By mail</a></li>
        <li><a href="/contact-en.php?id=02">Filling a Complaint</a></li>
        <li><a href="/contact-en.php?id=03">Media contacts</a></li>
    </ul>
</section>

to

<ul class="list-group menu list-unstyled">
    <li>
        <h3><a href="/contact-en.php">Contact Us</a></h3>
        <ul class="list-group menu list-unstyled">
            <li><a class="list-group-item" href="/contact-en.php?id=01">By mail</a></li>
            <li><a class="list-group-item" href="/contact-en.php?id=02">Filling a Complaint</a></li>
            <li><a class="list-group-item" href="/contact-en.php?id=03">Media contacts</a></li>
        </ul>
    </li>
</ul>

The difference is in the first line .. you are now in a ul class= list-group menu list-unstyled
after that you are going to add your H3 ... and again another ul class= list-group menu list-unstyled

For the bottom navigation, the word are no longer links so you have to re-think your bottom nav!

I hope this will help you started!

@upsonp
Copy link
Member

upsonp commented Apr 2, 2014

I really like the change to the left side menu, I think it's much cleaner and easier to implement.

@crochefort
Copy link
Contributor Author

What do you think of adding the first

  • to the script to clean the left menu itself ?

    From

            echo '<nav role="navigation" id="wb-sec" typeof="SiteNavigationElement" class="col-md-3 col-md-pull-9 visible-md visible-lg">';
            echo '<h2>'.$_SITE['wb_sec_'.$_PAGE['lang1']] .'</h2>' . "\n";
            echo '<!-- SecNavStart -->' . "\n";
    
            include_once $_PAGE['left_menu_gauche'];
    
            echo '<!-- SecNavEnd -->' . "\n";
            echo '</nav>' . PHP_EOL;

    to

     echo '<nav role="navigation" id="wb-sec" typeof="SiteNavigationElement" class="col-md-3 col-md-pull-9 visible-md visible-lg">';
                    echo '<h2>'.$_SITE['wb_sec_'.$_PAGE['lang1']] .'</h2>' . "\n";
                    echo '<ul class="list-group menu list-unstyled">';
                    echo '<li>';
            echo '<!-- SecNavStart -->' . "\n";
    
            include_once $_PAGE['left_menu_gauche'];
    
            echo '<!-- SecNavEnd -->' . "\n";
                    echo '</li>';
                    echo '</ul>';
            echo '</nav>' . PHP_EOL;

    So we will just save 1 ul and li in the menu file...

    What do you think?

    See PR Reduce the repetitive UL and LI for left menu #121 if you agree :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants