Jump to content


Photo
- - - - -

Custom Category Template


  • Please log in to reply
11 replies to this topic

#1 troytempleman

troytempleman

    Newbie

  • Members
  • 5 posts

Posted 14 March 2012 - 06:40 PM

Hi, is there a way to create a custom category template in PageLines? I would like to have a completely different category template from the default one. I've done this with other themes but the Pagelines architecture is a bit different. Basically I would like to know where Pagelines pulls in categories so that I can add a conditional statement to use a custom php category template for specific categories. I just want to change the content area so the header, sidebar and footer should remain the same. Thanks!

#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 14 March 2012 - 07:11 PM

Hi, if you go to Dashboard > PageLines > Templates and click in the first (left) layout map in the Page Templates area, you'll see a number of different template options. One of them is Category, where you may add a variety of drag and drop elements to your category template. Please keep in mind that as you cannot edit category pages once created as you can pages or posts, you won't be able to hide elements added to the category template later on. You can however, add sidebars, to which you may add content as needed using

Please Login or Register to see this Hidden Content

to determine which categories the content is applied.

#3 troytempleman

troytempleman

    Newbie

  • Members
  • 5 posts

Posted 14 March 2012 - 07:27 PM

In this case, I don't think the customizations I have in mind is possible through the drag and drop editor and I believe requires a custom php template. Is there anyway I can hook in such a template?

#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 15 March 2012 - 02:46 AM

Have you looked into this documentation on creating a custom page template?:

Please Login or Register to see this Hidden Content



#5 troytempleman

troytempleman

    Newbie

  • Members
  • 5 posts

Posted 15 March 2012 - 12:01 PM

Yes, but how do I modify that page to make it a custom category template?

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 16 March 2012 - 02:43 AM

The category page on PageLines isn't controlled by a standard category PHP file, so it'll need to be done a different way. Are you using either PageLines Customize or the base theme?

#7 troytempleman

troytempleman

    Newbie

  • Members
  • 5 posts

Posted 16 March 2012 - 01:11 PM

Yeah, I can see that there is no category.php file. If I can find out what file needs to be edited and where would be great. I'm using the PageLines Customize Plugin.

#8 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts
  • LocationWV
  • Country: Country Flag

Posted 16 March 2012 - 03:06 PM

Hi @troytempleman You have a couple options.

You can create a custom section to display the category page data and then add that section to the category template in Templates. (

Please Login or Register to see this Hidden Content

)

Or you can add the Universal Sidebar Widget to the category template in Templates and use the

Please Login or Register to see this Hidden Content

to display your data.

#9 troytempleman

troytempleman

    Newbie

  • Members
  • 5 posts

Posted 16 March 2012 - 04:18 PM

The custom section sounds like the more desirable option but I don't see on that page where it says how to create a custom section. Can you point me in the right direction?

#10 Jenny

Jenny

    Advocate

  • Unicorn Store Dev

  • 2924 posts
  • LocationWV
  • Country: Country Flag

Posted 16 March 2012 - 04:52 PM

You can download a sample section in the Developer Toolkit at

Please Login or Register to see this Hidden Content



#11 anthalis

anthalis

    Advanced Member

  • Members

  • 60 posts
  • Framework Version:Dev. Latest. Always.
  • Country: Country Flag

Posted 19 June 2012 - 07:57 AM

Hi Troy, If you still need a solution for this problem, you can check out a post of mine to see if this solution is satisfactory for you.

Please Login or Register to see this Hidden Content

Granted, it does use a shortcode and there is some coding, but your category templates will be able to support Drag&Drop sections. Also, it doesn't make use of third-party plugins. If you need further help, don't hesitate to ask. Good luck!

#12 Danny

Danny

    Is Awesome!

  • Moderators
  • 17653 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 19 June 2012 - 08:57 AM

Thanks for input @anthalis