current page-tab different layout?

Discuss PivotX 2.0.x themes here, and view themes that are available for download.

current page-tab different layout?

Postby rabbeltje » Tue Sep 09, 2008 8:46 am

as this is a theme-related question, i post it here.

i created the following site real bali, and they are all seperate pages built in html. i am thinking of changing it to pivot, because that would make it a LOT easier to adapt and adjust. the only thing i was wondering about is this: at the top you have the pages as tabs. the way it is styled now, the current/active pagetab has a different layout than the others (purely the tab :D). is it possible to achieve this in pivotx?
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: current page-tab different layout?

Postby gwbonline » Tue Sep 09, 2008 9:38 am

I do it this way:

Give the body of every page that has a tab an id:
<body id="test1">


Give the tab a class:
class="test1"


Edit your css file with:
body#test1 a.test1
{
here your layout of the tab
}
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: current page-tab different layout?

Postby rabbeltje » Tue Sep 09, 2008 10:06 am

not sure... the problem is this:

Code: Select all
         <table id="pg">
            [[ pagelist
            chapterbegin="<tr>"
            pages="<td class="paging"><a href='%link%' title='%subtitle%'>%title%</a></td><td class="pg-r"></td>"
            chapterend="</tr>"
            ]]   
         </table>


so... there's no seperate cells for each pagetab in the template, because they are dynamically created each time you add a page.

i know that for the entry-navigation there is a specific layout in the css-file for the active page with entries, so i was just wondering if there is something like that for the pages as well.
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: current page-tab different layout?

Postby Legolas » Tue Sep 09, 2008 12:45 pm

OK, simply use your code and write:
Code: Select all
<a href="?p=nameofthepage">nameofthelink</a>

Where nameofthepage is the name of your page as you can see in the pages list in the admin panel.

I think this is the easier way to do what you need.
Reality is an illusion caused by lack of alchool.
Legolas
 
Posts: 27
Joined: Mon Dec 17, 2007 11:13 am
Location: Italy

Re: current page-tab different layout?

Postby rabbeltje » Tue Sep 09, 2008 12:50 pm

you see, the code i used, is a code i got from another template from pivot, and by using this, new tabs automatically get added to the index-page. if i use any other way, like yours, if i were to create a new page, i'd have to add that to the frontpage, instead of it going automatically. see what i mean...?

i know how to get the effect i want manually, as you can see ;) as i already created that by just using html and css. i don't mind doing that, but if there's an automatic way it'd be much easier. so, basically, trying to rephrase the question: is there any way to get a different look for the active pagetab and the other pagetabs, and still using the automatic page-adding-thingy in pivot???
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: current page-tab different layout?

Postby Legolas » Tue Sep 09, 2008 1:11 pm

Yes i see now. I use a sub_header template that i include, with pivot include tag, in all my main template. So when i want to insert al link to a page i do it editing this template with the pivot built-in template editor. 2 minutes for apply the changes to all the pages/entries of the site. So i have the complete control of the layout.

Anyway, there's surely a way to reach the same result automatically. I'll try to find out how.
Reality is an illusion caused by lack of alchool.
Legolas
 
Posts: 27
Joined: Mon Dec 17, 2007 11:13 am
Location: Italy

Re: current page-tab different layout?

Postby Legolas » Tue Sep 09, 2008 1:16 pm

rabbeltje wrote:is there any way to get a different look for the active pagetab and the other pagetabs, and still using the automatic page-adding-thingy in pivot???


I think so. Really, as you can see, the current status of this type of link already exist and it's the bold format. The matter is: "What we have to edit to change it?" :D
Reality is an illusion caused by lack of alchool.
Legolas
 
Posts: 27
Joined: Mon Dec 17, 2007 11:13 am
Location: Italy

Re: current page-tab different layout?

Postby rabbeltje » Tue Sep 09, 2008 1:33 pm

okay, my mistake, i DO use the _sub_header for the page-tabs, not the frontpage. anyway... i could just as easily add pages manually and style them the way i want... i was just wondering if there isn't already a built-in way. because, if that is the case, all i have to do is use the pivot-interface to add a page and that's it.

now... i'm wondering about something. if i'd change it manually, i would change the page_template - as it is what the pages use. and there is no 'active' tab there, because all the seperate pages uses this one and the same template... so there really would have to be a built-in way, or else there'd be no point for me switching, as i'd still be changing every single page one at a time.
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Re: current page-tab different layout?

Postby Legolas » Tue Sep 09, 2008 1:38 pm

ok, try this.

First of all, add to your display table code the following lines:

Code: Select all
<table id="pg">
            [[ pagelist
            chapterbegin="<tr>"
            pages="<td class="paging"><a href='%link%' title='%subtitle%'>%title%</a></td><td class="pg-r"></td>"
            chapterend="</tr>"
            onlychapter="name"  (If you have more chapters but want to display only one)
            isactive="class='activepage' " (this is the goal)
            ]]   
         </table>



Then open pivot_essentials.css in your editor, find the class activepage, and modify it as you need.

Should work.
Reality is an illusion caused by lack of alchool.
Legolas
 
Posts: 27
Joined: Mon Dec 17, 2007 11:13 am
Location: Italy

Re: current page-tab different layout?

Postby rabbeltje » Tue Sep 09, 2008 1:41 pm

that looks like it should work :D i'm going to give it a try :) thanks for helping me!!

*edit: it doesn't... going to see if i'm doing something wrong here!!
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands

Next

Return to 2.x Themes

Who is online

Users browsing this forum: No registered users and 2 guests

cron