Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
siteHeader coding question

 

 


Kimber
User

Apr 21, 2009, 11:15 AM

Post #1 of 12 (7745 views)
Shortcut
siteHeader coding question Can't Post

Hello,

I use the

<!-- templateIf: $category.num$ eq "19" -->
<font size="4" face="Palatino Linotype"><b>$category.name$</b>
<!-- /templateIf -->

in the siteheader to make a category name at the top of each category but it wil not work. If I add plain text under <div id="header"> it work but the codes will not work.

Is there another coding I need to use in the siteheader to do this?

Thanks
Kimberly


Donna
Staff / Moderator


Apr 22, 2009, 11:41 AM

Post #2 of 12 (7740 views)
Shortcut
Re: [Kimber] siteHeader coding question [In reply to] Can't Post

Hi Kimber,

Can you give me more details about what you want to happen here?

Donna

--
support@interactivetools.com


Kimber
User

Apr 23, 2009, 4:48 AM

Post #3 of 12 (7735 views)
Shortcut
Re: [Donna] siteHeader coding question [In reply to] Can't Post

Hello,

In articleLists/categoryIndex.html Category 19 is Baby Shower Games and Puzzles

I use for example:

<!-- templateIf: $category.num$ eq "19" -->
<br><font face="Palatino Linotype" size="3"><b>$category.name$ free printables</b>
can be downloaded or opened directly from our website and printed
using your printer.
<!-- /templateIf -->

I get Baby Shower Games and Puzzles free printables can be downloaded or opened directly from our website and printed using your printer. The name of category name of category 19 (Baby Shower Games and Puzzles free printables) shows up on the category Baby Shower Games and Puzzles free printables page.

Which works fine.

I tried to use the singlePages/siteHeader.html

<!-- templateIf: $category.num$ eq "19" -->
<br><font face="Palatino Linotype" size="3"><b>$category.name$ Free Printables</b>
<!-- /templateIf -->

But nothing shows up. Then I tried add text only to the singlePages/siteHeader.html and it worked so I assume these codes only work in the articleLists/categoryIndex.html.

I was wondering if there where any codes I can use in the singlePages/siteHeader.html to make the $category.name$ and $article.title$ to show up at the top of the page for each category or article page.

Thanks
Kimberly


carminejg3
User

Apr 23, 2009, 5:09 PM

Post #4 of 12 (7728 views)
Shortcut
Re: [Kimber] siteHeader coding question [In reply to] Can't Post

Are you trying to include the first bit of code into a template outside of the artman2 template system? it might be that the system doesnt work on that outside page.


Webmaster [wink]
http://news.carjunky.com


Kimber
User

Apr 24, 2009, 3:58 AM

Post #5 of 12 (7720 views)
Shortcut
Re: [carminejg3] siteHeader coding question [In reply to] Can't Post


In Reply To
Are you trying to include the first bit of code into a template outside of the artman2 template system? it might be that the system doesnt work on that outside page.

I figure the codes do not work in the header but I was wondering if there where other codes that might work. Figure it was worth asking. Smile


carminejg3
User

Apr 24, 2009, 8:34 AM

Post #6 of 12 (7709 views)
Shortcut
Re: [Kimber] siteHeader coding question [In reply to] Can't Post

   

what about doing something like this.... splitting up your header include file into two parts... then inserting the section where you want to use the page name and titles so that article manger could insert the correct code.

on your main article manager template

Include header 1 code......
Insert the category and page names in here
Include header 2 code....

rest of page

This way your tags will get put through the engine, and your header include will still be mostly external....


Webmaster [wink]
http://news.carjunky.com


Kimber
User

Apr 24, 2009, 8:52 AM

Post #7 of 12 (7708 views)
Shortcut
Re: [carminejg3] siteHeader coding question [In reply to] Can't Post

I get the concept of what you are saying but I don't think I fully understand.

In the Admin > Template Editor type in siteheader2 into New Template and click "create"

Then in the articleLists/categoryIndex.html put

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

above

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

Correct?

However, would that work to show the $category.name$ if the siteheader does not work

Thank you
Kimberly


Kimber
User

Apr 24, 2009, 9:04 AM

Post #8 of 12 (7706 views)
Shortcut
Re: [carminejg3] siteHeader coding question [In reply to] Can't Post

I figure it out with what you posted but differently

If I put

<!-- templateIf: $category.num$ eq "19" --></b><font color="#800080" font size="4" face="Palatino Linotype"><b>$category.name$</b></font><!-- /templateIf --> right above the

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

It work perfectly

Have a nice day

Kimberly


Donna
Staff / Moderator


Apr 24, 2009, 4:06 PM

Post #9 of 12 (7704 views)
Shortcut
Re: [Kimber] siteHeader coding question [In reply to] Can't Post

Hi Kimber,

Sounds like you got it figured out. :)

The reason your original attempt wouldn't work is because that file has no way of knowing what category you're going to pull it up in -- in fact, ALL categories will have that on it.

SSI's are a great way for including static content that's the same on all pages. For any dynamic content, like a templateIf based on categories, you'll want to put that straight into the article pages/category pages directly. :)

Donna

--
support@interactivetools.com


carminejg3
User

Apr 24, 2009, 4:11 PM

Post #10 of 12 (7703 views)
Shortcut
Re: [Donna] siteHeader coding question [In reply to] Can't Post

Kimber,

Great... I was VERY angry when I found out that i had to create 80+ publishing rules with article manager 2.... BUT... It has been well worth the little work, and I'm finding out that there is a way for most things... sometimes you just need to think a little different. Good luck with your website.


Webmaster [wink]
http://news.carjunky.com


Kimber
User

Apr 27, 2009, 7:18 AM

Post #11 of 12 (6522 views)
Shortcut
Re: [carminejg3] siteHeader coding question [In reply to] Can't Post


In Reply To
Kimber,

Great... I was VERY angry when I found out that i had to create 80+ publishing rules with article manager 2.... BUT... <<<<<<<<<<

Don't feel bad...I finally printed out ever page of coding on the template in very large font then highlighted all the different matching codes in a color codes manner so I could figure out what was what before I started to get how it works. Then spent a week kicking for making it much harder than it is. Blush


carminejg3
User

Apr 27, 2009, 10:32 AM

Post #12 of 12 (6273 views)
Shortcut
Re: [Kimber] siteHeader coding question [In reply to] Can't Post

lol...

well now after I cooled off a little I see a lot of bonuses to the new version.

Like the ability to insert pictures on the index page say for only the top article... or even just the fith article. or you could insert an ad after the any article you want...

pretty cool


Webmaster [wink]
http://news.carjunky.com