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.

Re: paging in user page

Postby Justice » Wed Jun 27, 2012 3:54 pm

Harm10 wrote: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!


Oh. :oops: i'm agree.

Okey. I have 20 entries on my page, but show only 12. For showing next 8 i must use [[ nextentry ]] in my page.tpl
But it didn't work! Just empty place!
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby Harm10 » Wed Jun 27, 2012 4:11 pm

I think you have problems with the concept of what goes where.
front.tpl/archive.tpl are for showing the content of your defined subweblog.
Categories are allocated to a subweblog.
Categories consist of entries.
When you select an entry for detailed viewing you end up on entry.tpl. There you can use nextentry.

Other entities are chapters. These are not allocated to subweblogs or whatsoever.
Chapters consist of pages. When you view a page in detail you end up on page.tpl. There you can use nextpage.

So if you are displaying entries on a page tpl you are doing something very peculiar. The content will show but template tags could not work (as you noticed).

Why are you displaying entries on page tpl?
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 » Fri Jun 29, 2012 10:30 am

Harm10 wrote:Why are you displaying entries on page tpl?


i'm a little confused about this. front.tpl i'm using for displaying categories of subweblog and entries of all users that post entries. Sorted entries by categories are displaying on front.tpl and i'm using paging there, because of many entries. On main page i'm just displaying last 10 articles by all users. And every user have his own page (page.tpl) where he can see all his entries. So for user page i use page.tpl and in PivotX built-in editor i write code for displaying last 12 user entries. But if user have more that 12, you can see it only in categories, so i started to find a way for displaying all user entries with help of paging. Did i understand correctly that using page.tpl for user page is wrong way?
Justice
 
Posts: 49
Joined: Wed Nov 23, 2011 10:18 pm

Re: paging in user page

Postby Harm10 » Fri Jun 29, 2012 10:54 am

The problem is not in the name of tpl file but in its content. If you changed the content of page.tpl to something similar as is in front.tpl (with subweblog template and the rest) and you navigate to this new template through the front template (you can see that in the debug display in the right corner of your webpage if you have debug switched on and you are logged in) then paging should work.
Again if you want to page entries they need to be shown through a subweblog template tag code otherwise you won't get that type of paging.

You are aware that you can include other templates in the base template for your own navigation?
Something like this (in front.tpl) navigates to your own template for category lists:
Code: Select all
[[ if $modifier.category && $modifier.pagetype == 'weblog' ]][[* category_list *]]
    [[ include file="`$templatedir`/category.tpl" ]]
[[ else ]]
... normal content of front.tpl
[[ /if ]]
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)

Previous

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 1 guest