Change sorting order of blog

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

Change sorting order of blog

Postby danielschut » Thu Jul 24, 2014 4:46 pm

Hi everyone! I'm refreshing my current website: www.deluistervinken.nl. The first tests are looking nice, if I say so myself - I'll put it in the show-off topic when I'm done.

I have the following question:

The problem:
as you can see, at my current (old) site I have a page with 'open inschrijvingen':

http://www.deluistervinken.nl/category/ ... schrijving

This is a subweblog of the main weblog.

The problem is that I don't like the sorting order of this category: the purpose of this part is to show visitors a list of the coming workshops I organize. The standard sorting order for a blog is from 'newest' to 'oldest', but for a page that displays workshops, the order 'oldest' to 'newest' would be better. Compare it to this site:

http://www.denkproducties.nl/seminars/

Where they have the first upcoming workshop on top, the one after that below it, et cetera.

the question:
How can I change the sorting order? either in this particular subweblog or in a new weblog?

Thanks in advance!
danielschut
 
Posts: 69
Joined: Tue Jun 02, 2009 4:42 pm

Re: Change sorting order of blog

Postby Harm10 » Fri Jul 25, 2014 2:26 pm

Hi the sorting order can be influenced in the tag you are using in your template.
For the subweblog tag you can use order or orderby http://book.pivotx.net/index.php?page=app-b#anchor-subweblog--weblog
For pages you have similar parms to set the order.

For more detailed answers you need to post your template code.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Change sorting order of blog

Postby danielschut » Fri Jul 25, 2014 4:07 pm

Hi Harm10, thanks for your ever-present sage advice!

So, if I understand correctly:

The frontpage-template is the template that determines the entire lay-out of the blog. If I change paramaters there, it should reflect on the order. Is that correct?

Currently, that frontpage_template looks like this:

Code: Select all
[[ include file="`$templatedir`/_sub_header.html" ]]
[[ include file="`$templatedir`/_sub_menuheader.html" ]]

   
   <div id="content">
   
      <div id="main">
   
      
         <!-- begin of weblog 'standard' -->
         [[ subweblog name="standard" ]][[ literal ]]
      
         <div class="entry">
            <h2><a href="[[ link hrefonly=1 ]]">[[ title ]]</a></h2>
            <h3>[[ subtitle ]]</h3>
            [[ introduction ]]
            <p>[[ more ]]</p>
            
            
         </div>
         
         [[ /literal ]][[ /subweblog ]]
         <!-- end of weblog 'standard' -->
         
         <div class="pagenav">
            [[ paging action="prev" ]] |
            [[ paging action="curr" ]] |
            [[ paging action="next" ]]
         </div>
         
         <!-- remove the stars to enable the Digg style paginator -->
         [[* paging action="digg" *]]          
               
      </div><!-- #main -->
   
      [[ include file="`$templatedir`/_sub_sidebar.html" ]]
      
   </div><!-- #content -->
   
[[ include file="`$templatedir`/_sub_footer.html" ]]


And if I understand corectly, I have to add: "order="asc" somewhere" for the 'standard' weblog to appear with the oldest post up front, but where should I add this?

Again, thanks in advance!
danielschut
 
Posts: 69
Joined: Tue Jun 02, 2009 4:42 pm

Re: Change sorting order of blog

Postby danielschut » Fri Jul 25, 2014 4:21 pm

Added:

So. I decided to create a second weblog with a different order in pivotx. Unfortunately, all the older posts are now moved to the second weblog and the previous, older weblog now appears empty or irrelevant. What did I do wrong?
danielschut
 
Posts: 69
Joined: Tue Jun 02, 2009 4:42 pm

Re: Change sorting order of blog

Postby Harm10 » Fri Jul 25, 2014 9:53 pm

What weblog did you set as default for Site homepage in your settings? That is in Administration / Configuration / Common settings.
And posts are not moved just displayed through the other weblog. You can set categories to more than 1 weblog.

For your other question:
The [[ subweblog part is the subweblog tag. So if you code
Code: Select all
[[ subweblog name="standard" order="desc" ]]
you will get the order descending
You can even use the orderby parm to select any of the fields defined for an entry (even the extrafields if you use extension Bonusfields)
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Change sorting order of blog

Postby danielschut » Sat Jul 26, 2014 8:30 am

I think I got it, Harm10, thanks!
danielschut
 
Posts: 69
Joined: Tue Jun 02, 2009 4:42 pm

Re: Change sorting order of blog

Postby danielschut » Sat Jul 26, 2014 6:05 pm

Hi @Harm10, it looks like I didn't get it.

So, I've made two frontpage-templates and I've made sure that each weblog has seperate categories.

But somehow pivotx decides to show only one blog, as far as I understand. It has to do with the setting in the administration -> configuration -> common settings part, as you mentioned. You said I could set options there, but I can't discover a field where I can do this. My menus in this part look as follows (See Attachment). Any ideas what I need to change?

Kindest regards,

Daniël
Attachments
screenshot config-menu danielschut.png
screenshot configuration menu Daniel Schut
screenshot config-menu danielschut.png (26.88 KiB) Viewed 15719 times
danielschut
 
Posts: 69
Joined: Tue Jun 02, 2009 4:42 pm

Re: Change sorting order of blog

Postby Harm10 » Sat Jul 26, 2014 6:29 pm

With the Website Homepage you can select what will be your homepage = frontpage.
Currently you have a specific page (Trainingsoverzicht) there but if you go through its options you will definitely see your weblogs there too.
If you select one of them it will be shown through the frontpage template.

What also helps is switching on debug mode. Besides offering you the display of errors and warnings in the debug log through your Dashboard it also creates a tiny tab in the right corner of your website (with a green ball). Click on it and see some information. Click on modifiers and will see those and the template sequence as well.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Change sorting order of blog

Postby danielschut » Sat Jul 26, 2014 6:48 pm

Thanks!

The problem with setting my blog as the 'homepage' is that I don't want that: I want the homepage to be a specific page. For now. it's still the 'trainingsoverzicht', but later on it will be a dedicated landing page with a caroussel of pictures, like most companies have these day.

But I have been trying something else, which makes me think there might be other solutions. Here's what I found now:


If you go to this page, this should be the new weblog:
http://www.deluistervinken.nl/weblog/se ... ebatevents

And if you go here, these are all entries from the old webblog:
http://deluistervinken.nl/category/weblog

I've made a seperate category called 'weblog' within the general primary weblog about three years ago, to be able to seperate out dedicated blogseries, like this one:
http://www.deluistervinken.nl/category/ ... -een-debat

Using categories for these blogseries seems useful

So, I've created a new frontpage with a different ordering (set to 'asc'). But here's the problem: somehow, both blogs always want to use the same frontpage. Even if I change it in the setting of the blog, it just doesn't 'see' the other frontpage_template_specificname I set it to.

Your help is very much appreciated!
danielschut
 
Posts: 69
Joined: Tue Jun 02, 2009 4:42 pm

Re: Change sorting order of blog

Postby Harm10 » Sat Jul 26, 2014 7:27 pm

First advice: study the structure of theme Skinny. It is a simple theme with basic navigation.

Whenever you enter a specific weblog in the normal way (so no special category) PivotX searches for the template you specify it to use for the frontpage template in the weblog settings. So have you set it for both weblogs to point to a different template?
You can let PivotX generate a linked list for all weblogs there are through the tag weblog_list
http://book.pivotx.net/index.php?page=app-b#anchor-weblog_list

Another option could be to create a frontend template of your own naming and route the navigation to the right weblog depending on weblog name (it is in the modifiers) with include tags:
Code: Select all
[[ include file="`$templatedir`/weblog1_front.tpl" ]]

Remember that when you page the archive template is used.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
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: Bing [Bot] and 9 guests

cron