Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • danieljames50 Friend
    #178737

    I wanted to sort the timeline by category instead of year but there are no settings to do this in the back en d that could find. So I can up with a sort of “work-around.”

    1.) Change PHP code to display category name instead of year:

    In file: templatesja_lenshtmlcom_k2ja_lenscategory_it em.php – Change the following:
    <div class=”inner item-inner clearfix”>
    <h2><?php echo $timeline; ?></h2>
    <p><?php echo $this->yearCounts[$this->currTimeline]; echo ‘ item’ . ($this->yearCounts[$this->currTimeline] > 1 ? ‘s’ : ”) ; ?></p>
    </div>

    To:
    <div class=”inner item-inner clearfix”>
    <h2><?php echo $this->item->category->name; ?></h2>
    <p><?php echo $this->yearCounts[$this->currTimeline]; echo ‘ item’ . ($this->yearCounts[$this->currTimeline] > 1 ? ‘s’ : ”) ; ?></p>
    </div>

    2.)Sort ‘Item Ordering’ in ‘Basic Options’ by ‘order’

    3.) Order K2 Categories in in order you’d like them to be displayed.
    4.) Change year of items in each category by year. (top category items 2012, 2nd category 2011, etc…)
    5.) Order items in the order you’d like them displayed.

    That’s it. It’s not a perfect solution and it takes time to setup but the final result ended up being exactly what i wanted. Hope this helps someone.

    actionlimo Friend
    #477903

    YOU. ARE. AWESOME!
    😀 Thank you!

    danieljames50 Friend
    #477906

    Glad my tip was helpful. 🙂

    actionlimo Friend
    #477928

    The only questions I have now are; Is there a way to hyperlink the categories?
    and is there a way to move the words on the category square up or change the font size because the article count is cut off on a few of them.

    danieljames50 Friend
    #477965

    I’m not sure how to link the category name. I’m guessing the link attributes can be added to the same line as the edited code above but I don’t know Joomla well enough to explain how. As for the location of the words, just edit the corresponding code in template.css. Use Firebug in Mozilla Firefox to tell you which line to edit.

    bohemiadesign Friend
    #478218

    Thanks for this tip – very good. One ‘problem” i have though id that I can’t get the headings for the different categories to show – it is only the heading for the first category that is displayed. There are 2 categories Street Photography (3items) and Stenciled art (5items) but for some reason i only see the first heading and the total item count of BOTH categories.
    please attached screeen shot.

    thanks,
    j


    1. Capture
    danieljames50 Friend
    #478311

    Hmmm…sounds like the articles might be in the same category. I’m happy to take a look if you want to share a link to your site.

    bohemiadesign Friend
    #478489

    Hi,
    I figured out the problem I had. I didn’t follow ‘Step 4’ – ie order the articles by year depending on categories.

    Thanks for a great tip. Unfortunately this will not work for us as we require the creattion date to be true – ie when the articl was/is created.

    j

    danieljames50 Friend
    #478755

    You could probably adjust the category listing settings to get it to display the way you want it.

    bohemiadesign Friend
    #479251

    Hi,

    Are there anyway to not have the articles to ‘group’ by date under the categories? For example in attahced screenshot the articles are all under the same category but they are added at 2 different dates.

    Any suggestions would be much appriciated.

    Thanks,
    j


    1. Capture
    danieljames50 Friend
    #479289

    Have you tried changing the ‘Item Ordering’ in ‘Basic Options’ to date instead of order?

    bohemiadesign Friend
    #479310

    Hi,

    I did try different sorting options. If I for example select ‘Most recent first’ it will sort the items coreectly but still group them the by date. The same occur if I select any other sorting option.

    Thanks,
    J

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 12 replies, has 3 voices, and was last updated by  bohemiadesign 11 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum