Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
Category Help and header

 

 


snaketorque
User

Dec 9, 2006, 7:32 AM

Post #1 of 9 (492 views)
Shortcut
Category Help and header Can't Post

Hi

I have installed AM2 and will be running 2 discrete sections of the site, a racing and a tuning section.

I have the article pages being published correctly to the distinct directories, and I have a header publish rule defined with seperate headers pages.

Both header pages are being generated, however the include within the pages is to the same header on both disctinct directories as opposed to the header located within the diretories, for example on all article pages it is pointing to /tuning/headerfile but I would expect the page to just reference to the header file located in its directory.

Any ideas because I am stumped.

Thanks

Robert


snaketorque
User

Dec 9, 2006, 8:02 AM

Post #2 of 9 (489 views)
Shortcut
Re: [snaketorque] Category Help and header [In reply to] Can't Post

Update

I have 2 header publishing rules, they both defined different header templates.

The publish directory is also different for both publishing rules.

I also have 2 seperate publishing rules for the article pages, again soecifying different directories, but the actual page template is common.

Thanks

Rob


ross
Staff / Moderator


Dec 10, 2006, 3:22 PM

Post #3 of 9 (472 views)
Shortcut
Re: [snaketorque] Category Help and header [In reply to] Can't Post

Hi Rob.

Thanks for posting and welcome to the board!

I think what you'll be able to do here is use what are called templateif's to get this going. Basically, you'll put some code on your template that says, if the article you are looking at is from category 1, show the first header. If it is from the other category, show the second header.

The code for that would look something like this:


Code
 
<!-- templateIf : $category.num$ == "1" -->
<!-#include virtual="placeholder for header 1" -->
<!-- /templateIf -->

<!-- templateIf : $category.num$ == "2" -->
<!-#include virtual="placeholder for header 2" -->
<!-- /templateIf -->


You just need to swap in your category numbers and the appropriate include paths and that should be it.

Does that make sense? Give it a shot and remember republish your articles Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - 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.




snaketorque
User

Dec 10, 2006, 3:45 PM

Post #4 of 9 (470 views)
Shortcut
Re: [ross] Category Help and header [In reply to] Can't Post

I also have subcategories, I presume that this won't work on the subcats as they are a different cat number.

For example, racing main category is ref 21, the BMW race reports is cat ref 24 but need the same racing header.

Rob


ross
Staff / Moderator


Dec 10, 2006, 4:32 PM

Post #5 of 9 (467 views)
Shortcut
Re: [snaketorque] Category Help and header [In reply to] Can't Post

Hi again Rob.

That's not going to be a problem.

You can just add some more templateif's to accomodate the additional categories. For example:


Code
 
<!-- templateIf : $category.num$ == "1" -->
<!-#include virtual="placeholder for header 1" -->
<!-- /templateIf -->

<!-- templateIf : $category.num$ == "2" -->
<!-#include virtual="placeholder for header 1" -->
<!-- /templateIf -->

<!-- templateIf : $category.num$ == "3" -->
<!-#include virtual="placeholder for header 2" -->
<!-- /templateIf -->

<!-- templateIf : $category.num$ == "4" -->
<!-#include virtual="placeholder for header 3" -->
<!-- /templateIf -->

<!-- templateIf : $category.num$ == "5" -->
<!-#include virtual="placeholder for header 1" -->
<!-- /templateIf -->


See how I have 5 templateifs? The first two are using 1 include and the second two are using a different include. The fifth one switches back to using the first include again.

Does that make sense? Let me know what you think Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - 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.




snaketorque
User

Dec 10, 2006, 4:45 PM

Post #6 of 9 (465 views)
Shortcut
Re: [ross] Category Help and header [In reply to] Can't Post


In Reply To
Hi again Rob.

That's not going to be a problem.

You can just add some more templateif's to accomodate the additional categories.


Ross

Thanks for the info, but I will have a lot of subcategories so to list them all as templateifs would be more code than the actual template include. Wink

I think I may just direct link them, they are being created but not being linked properly.

Now, is there a simpler way to do this?

The article page has the following virtual.

<!--#include virtual="$published.header.webpath$" -->

If I change the placeholder set name in the racing header publish rule to racingheader for example and create a new publish rule for racing articles which has the include <!--#include virtual="$published.racingheader.webpath$" -->, would this work?

Many thanks

Rob


ross
Staff / Moderator


Dec 10, 2006, 5:11 PM

Post #7 of 9 (462 views)
Shortcut
Re: [snaketorque] Category Help and header [In reply to] Can't Post

Hi Rob.

I got a new idea here Smile.

Since there is going to be a lot of categories involved here, I am wondering what exactly is changing from category to category in the header. Is it just an image and maybe a block of text?

If that is the case, or it is something similar, it's actually going to work better if we created a couple new fields in your category table so you can enter these details into the categories themselves.

That way, you wouldn't have to worry about custom templates for each category. The header stuff will pull in from those fields you setup automatically for each category.

Let me know what you think and what is going to change for each category.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - 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.




snaketorque
User

Dec 10, 2006, 5:19 PM

Post #8 of 9 (459 views)
Shortcut
Re: [ross] Category Help and header [In reply to] Can't Post


In Reply To
Let me know what you think and what is going to change for each category.


Ross

I have temporarily hardcoded the header includes as I need to work on the site getting a load of content on there, and working on the look and feel.

The only thing that is going to change between the top level categories is the menu system, which will be common to each sub-category.

The following 2 pages are the racing and tuning headers, and as you can see, the only change is the drop down menu.

http://www.thorneymotorsport.co.uk/racing/2005_Rounds_2_3_-_Rockingham.shtml

http://www.thorneymotorsport.co.uk/tuning/Power_-_VX220_Turbo.shtml

Best regards

Rob


(This post was edited by snaketorque on Dec 10, 2006, 5:20 PM)


ross
Staff / Moderator


Dec 12, 2006, 8:31 AM

Post #9 of 9 (437 views)
Shortcut
Re: [snaketorque] Category Help and header [In reply to] Can't Post

Hi Rob.

Thanks for the sample links. Now that I can see what's happening in your header, I actually have another new idea Smile.

The first thing though, are those menu's being created by Article Manager? Or when you say you are hard coding things onto the page, does that include these menus?

If they were just being hardcoded onto your page, here's what I am thinking you could do. Create one new file for each of your categories (that has all the code for the menu in it) and name them the same thing as the category they are for. You may want to keep all these files in a seperate folder just to keep things organized.

Now, on your templates, you would just need to do an include like this:

<!--#include virtual="$category.name$.shtml" -->

Just adjust the path so that it points to your files in the right place.

Do you think that would work? Let me know Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - 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.



 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4