paging in user page

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

paging in user page

Postby Justice » Wed Jun 20, 2012 5:03 pm

Hi, for displaying user enties i'm using next code
Code: Select all
[[ subweblog name='standard' amount=12 user='admin']][[ literal ]][[title]]
[[ introduction ]] Cat: [[ category link=true ]] / Date: [[ date format='%day%.%month%.%year%' ]][[ /literal ]]  [[ /subweblog ]] 


But if i want using paging here, what construction i must to use? if i'm writing
Code: Select all
[[ subweblog name="standard" amount=12]][[ literal ]]

[[ paging action='prev' amount=12 format='« Назад (%num_from% - %num_to%)' ]] |  
[[ paging action='curr' amount=12 format='Статьи %num_from% - %num_to% с %num_tot%' ]] |  
[[ paging action='next' amount=12 format='Далее (%num_from% - %num_to%) » ' ]]

[[ /literal ]][[ /subweblog ]]
there's nothing is displayed. What i need to do? Thank you.
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby hansfn » Wed Jun 20, 2012 8:48 pm

The paging tag should be outside/after the closing subweblog tag - look at the default templates. It might that easy, but I don't promise anything.
hansfn
Developer
 
Posts: 3072
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: paging in user page

Postby Justice » Thu Jun 21, 2012 8:10 am

hansfn wrote:The paging tag should be outside/after the closing subweblog tag - look at the default templates. It might that easy, but I don't promise anything.


Still can't find my mistake. With categories paging all is OK, but in user page wherever i place my 'paging' tag, it doesn't show me the result, only "||" symbols. Plz show me the right way!
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby Harm10 » Thu Jun 21, 2012 1:49 pm

Please post your current template code and, if possible, a link to your site.
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1601
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: paging in user page

Postby Justice » Thu Jun 21, 2012 8:49 pm

Okey. In admin panel i have user page with page-1.tpl template. In page for viewing last 12 user entries i use
Code: Select all

[[ subweblog name='standard' amount=12 user='n-matvienko']][[ literal ]]
[[title]]
[[ introduction ]] [[ category link=true ]] /  [[ date format='%day%.%month%.%year%' ]]
[[ /literal ]]  [[ /subweblog ]] 


My page-1.tpl
Code: Select all
[[include file="`$templatedir`/header/_sub_header-1.tpl"]]
       
            <div id="main-top"></div>
            <div id="main">

                <div id="content">


[[include file="`$templatedir`/_sub_sidebar_psycho_left.tpl"]]
                    <!-- page '[[title]]' -->
                    <div id="entry-[[uid]]" class="entry">
                        [[ if $entry.extrafields.image!="" ]]
                        <a href="[[home]]images/[[$entry.extrafields.image]]" class="thickbox fancybox"
            title="[[$entry.extrafields.description]]">
                            <img src="[[pivotx_url]]includes/timthumb.php?src=[[$entry.extrafields.image]]&amp;w=175&amp;h=150" alt="[[$entry.extrafields.description]]" class="extraimage" />
                        </a>
                        [[ /if ]]
                        <h2 class="title" align="center">
                            <a href="[[  link hrefonly=1  ]]">[[ title ]]</a>
                        </h2>


                        [[ introduction ]]

                       
                        [[ body ]]

                    </div>

  [[include file="`$templatedir`/_sub_sidebar_psycho.tpl"]]
               
 </div> <!-- end content -->

             
            </div>
            <div id="main-bottom"></div> 
        </div>
        [[include file="`$templatedir`/_sub_footer.tpl"]]
    </body>
    </html>


Now i'm trying to do that on my localhost with apache+php so can't show a link :cry:

where must i write my [[ paging ]] tags??
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby Harm10 » Thu Jun 21, 2012 9:49 pm

You have to look in your own web page source then to check whether there are template errors reported.

Do I understand you correct that you have put a subweblog in an entry?
And is that entry part of another weblog (possibly also called 'standard')?
Why would you want to do that?
Paging when displaying the details of an entry is only active for the weblog that contains this entry and so is active.

A subweblog loop normally resides on the front template. So first put it there and see if it pages correctly. Then you can go and experiment with more subweblogs.

Switching on debug also helps. In the debug bar you can see the sequence of templates that are active and the modifiers tell you what weblog is active.

It would also help if you told us what definitions you set on the subweblog tab of the weblog in the dashboard administration.
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1601
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: paging in user page

Postby Justice » Mon Jun 25, 2012 1:14 pm

I have a lot of experimenting and saw that in .tpl wit categories paging works good but in other tempaltes it's not..
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby Harm10 » Mon Jun 25, 2012 2:22 pm

Be a bit more precise! In what tpl's does paging not work?
Archives can't be paged. You can simulate paging there with the use of extension Simplepager.
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1601
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: paging in user page

Postby Justice » Mon Jun 25, 2012 2:36 pm

Harm10 wrote:Be a bit more precise! In what tpl's does paging not work?
Archives can't be paged. You can simulate paging there with the use of extension Simplepager.


Oh, sorry i was a little wrong.. In my Phoenix theme i'm using front.tpl for categories and paging there is works. When i use paging for calling next number of articles Phoenix use archieve.tpl. so code in that tpl files must be the same
Code: Select all
[[ subweblog user='admin'  amount=12]][[ literal ]]   
 
[[ introduction ]]   
 
[[ category link=true ]] / : [[ date format='%day%.%month%.%year%' ]] : <a href='?p=[[ user ]]'>[[ user field=nickname]]</a>   

 [[ if $last]]

[[ paging action='prev' amount=6 format='&laquo; <<< (%num_from% - %num_to%)' ]] | 
[[ paging action='curr' amount=6 format='Entries %num_from% - %num_to% с %num_tot%' ]] | 
[[ paging action='next' amount=6 format='>>>(%num_from% - %num_to%) &raquo; ' ]]   
[[ /if ]]

[[ /literal ]][[ /subweblog ]]


With this code the problem is solved.. but. When i copy that into page.tpl (template for the user that posts entries) it didn't work. The same thing if i choose front.tpl template for user page..

How can i move all front.tpl properties to the page.tpl ??
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby Harm10 » Mon Jun 25, 2012 4:24 pm

Did you read the documentation? http://book.pivotx.net/index.php?page=app-b#anchor-nextentry
When you are on front or archive tpl you are looking at a collection of entries. For that is template tag [[paging]] designed.
When you select the details of an entry or a page then you need other template tags: nextentry, nextpage, previousentry or previouspage.
Are these not coded in the Phoenix theme?
Check out the standard 4 themes (e.g. Skinny) to learn the basic structure!
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1601
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Next

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 0 guests

cron