Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple page in template / Content Slider theme
#9
I forgot to explain how to do ! so ...

Create all the parts of your page as subpages of index. (n00dles101 method)

index
--homecontent
--aboutcontent
--portfoliocontent
  • Edit these pages as normal
  • Add them to the menu
  • Select the position you wish
  • DO NOT set to private.
You can set to private all page that you won't to display in the menu. The function my_get_navigation in theme is there to create the menu.

Then to include them in your template just use (replace "about" by your "ID") / (i'm working on getPageContent implementation that will generate automaticly the content.

Code:
<!-- About -->
        <div id="about" class="panel">
            <div class="content">
                <h2><?php getPageField('aboutcontent','title');?></h2>
                <?php getPageContent('aboutcontent'); ?>

            </div>
        </div>
        <!-- /About -->

edit :

New version ! (I think in few days I will be able to purpose you a final version ^^)

Function.php :
add my_GetPageContent function
--> you have to put in parameter : the page (like getpagecontent) and the type
------> the type is the class of the div : "content" or "panel". Only the first page must be "content" type and other must be "panel" type.
example :
Code:
<!-- Home -->
        
            <?php my_getPageContent('home','content'); ?>
        
        <!-- /Home -->
        
        <!-- Portfolio -->
        
            <?php my_getPageContent('portfolio','panel'); ?>
            
        <!-- /Portfolio -->
        
        <!-- offers -->
        
            <?php my_getPageContent('offers','panel'); ?>
            
        <!-- /offers -->

template.php :
Just need to add <?php my_getPageContent('my-slug-page','content-or-panel'); ?> in the body for each slug page you wish to display.

If you want to add a personnal content directly in the template you have to add this code :
in template.php (replace your-id-content by your own id)
Code:
<div id="your-id-content" class="panel">
            <div class="content">
                <!--Your content, component code etc -->
            </div>
        </div>
in style.css (replace every 'index' by your-id-content you define in template.php) that's permit to display correctly the link in the menu:
Code:
#index:target ~ #header #navigation #link-index{ background: #000; color: #fff; opacity:0.9;}

I hope my development is good.
Reply


Messages In This Thread
Multiple page in template / Content Slider theme - by didou038 - 2012-04-06, 18:40:05



Users browsing this thread: 1 Guest(s)