 |

dave_81
User
Aug 12, 2008, 8:29 AM
Post #1 of 2
(686 views)
Shortcut
|
|
featured pages
|
Can't Post
|
|
Hello Im wondering if you can help? I want te be able to add a featured category on my home page, so basically I could either select a new page each week to be featured on my home page? I can see you can do this for the articles, however i am using single page category content pages rather than article content pages. What would be the process for doing this? Many thanks
|
|
|  |
 |

Jake
Staff
/ Moderator

Aug 13, 2008, 11:49 AM
Post #2 of 2
(667 views)
Shortcut
|
Hi dave_81, Thanks for posting! To set this up, you'll first want to create a new checkbox field by clicking the "edit table & fields" link for db_category under Admin -> Database Editor. Use "featured" for its name; you can use a label like "Featured Category". The default settings for this field should be fine. The next step is to create a template for displaying your category content, which includes a templateIf to restrict the display of categories to only ones that have the "Featured" checkbox enabled. Here's some example code for this:
<!-- templateIf: $category.featured$ eq "Yes" --> $category.content$ <!-- /templateIf --> Call this template "featuredCategory.html". Now you need to create a new "category menu" publishing rule, which will be used to control the display of your category content. Give this rule a placeholder set name of "featuredCategory", and choose the custom template we created in the previous step. This should be set to publish "One File" - use a filename of "include_featuredCategory". The other settings should be fine. Finally, on your globalIndex.html template you need to add this line of code where you'd like your content to appear:
<!--#include virtual="$published.featuredCategory.webpath$" --> That should be it! Note that if you have more than one category with this checkbox enabled, they'll both be displayed. There isn't a way around this, so you'll want to be careful when changing the featured category content on your site. ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 | |  |
|