Webmastersite.net
Register Log In

Titles above link type entries

Comments on Titles above link type entries

Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Feb 12, 2007 - 12:12 PM:

Hi, I have separated tables for each of my 3 link types, they display beneath each other. I want a title top of each list of links, so from left to right 3 titles. But sometinmes, i don't have a link for every type, so only neccessary titles should be displayed. but i don't get it.


in displaylinks.tpl, i have this:


<div style="float: right; width: 33%;">

<IF {LINKTYPE} is "forum">
<div class="linktype">
<h3>Forums</h3>
</div>
</IF>

<table width="100%" cellpadding="5" cellspacing="10" border="1px">
<!-- BEGIN FORUM LINKS -->


This does not work, as the IF {LINKTYPE} won't recognize anything, because it is not inside the <!-- BEGIN... ...<!-- END.. comments.

But if i put it inside (well i don't need a condition then), it will display the title as often as there are links in. So if the category has 5 links of type "forum", i get the title "Forums" 5 times below each other raised eyebrow


Do u know a workaround?


Starship-Trooper

another Q:
how do i get the subcategory-display on main-page and category pages to reduce to 3 or 4 and then a ",...", so it won't give me a full list? I did not find this topic, but am quite sure i have read about it before.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 13, 2007 - 7:33 PM:

Don't use quotes in your conditionals.

What you're looking for it totals for the category:
scripts.webmastersite.net/w...Category_Variables-11.html
To show the total of each type within a category while on the display links page, use {REGULARTOTAL}, {OTHERTYPETOTAL} etc. Elsewhere use CATTYPETOTAL as explained above.


how do i get the subcategory-display on main-page and category pages to reduce to 3 or 4 and then a ",...", so it won't give me a full list?

Admin->Settings->Categories, subcats on main page.
Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Feb 14, 2007 - 6:22 AM:

<What you're looking for it totals for the category:

1)Could you be so kind and explain this to me? I did not get it right. To make sure you understand me, i want no link-count as heading of the links, but the "link type display name".
And only once(if i place it below "<!--BEGIN..", the heading will be there as many times as there are links).
And only, if there are links in the cat (if i place it above the "<!--BEGIN.." (without IF), it will also be displayed if there is no content in the category. If i place it with IF, it cannot determine the LINKTYPE as it's not in the "<!--BEGIN..").



<<how do i get the subcategory-display on main-page and category pages to reduce to 3 or 4 and then a ",...", so it won't give me a full list?

<Admin->Settings->Categories, subcats on main page.

2)I tried that before. That did not do it. no changes sad (no cachin problem, i have checked that.)
Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Feb 14, 2007 - 6:31 AM:

sth like a for.. would probably help. But I'm not into that, so maybe thats just stupid.

To get this displayed:
<div class="linktype">
<h3>Forums</h3>
</div>

I'd have to declare (below <!--BEGIN FORUM..) that this will be only displayed one time, so only for the 1st cycle. ..BUT HOW?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 15, 2007 - 1:26 AM:

1) If what you want is only show blah if there are links of type x, do <IF {TOTALXLINKS}>blah</IF>. If you want to do something else I don't understand what "no link-count as heading of the links, but the "link type display name"." means. If you're looking for something to show within the scope of a link, scripts.webmastersite.net/w...les/Link_Variables-10.html . If not inside, then look at the category variables instead.

2) When you change subcats on the main page, since they're cached, you have to regenerate categories for changes to appear.
Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Feb 15, 2007 - 3:40 AM:

1) I guess i cannot explain very good. It seems you do not understand what my problem is. I'll attach 2 screenshots. in one, it shows what happens in a category where there is NO forum link, if i put text ("blah") above <!-- BEGIN FORUM LINKS -->
=> "blah" will still be there, but shouldn't

In the other it will show what happens if there are more than one forum links, and if i put text below <!-- BEGIN FORUM LINKS -->.
=> blah will only be there if there is a forum link, but as often as there are links..



2) that works, TY!

Attached Files:
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 15, 2007 - 10:10 PM:

If you don't want blah there, conditionalize it as I explained in post #2 and post 5. The category type totals are what you want.
Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
Posted Feb 16, 2007 - 3:32 AM:

i don't get it.

where should i put it?
how?

i put <IF {TOTALLINKTYPEXLINKS}>the linktypeX headline</IF> (in multilanguage displaylinks.tpl) above the <!--BEGIN "linktypeX".. :
=> the headline will also be displayed if there is no link of linktypeX

i put <IF {TOTALLINKTYPEXLINKS}>the linktypeX headline</IF> below the <!--BEGIN "linktypeX".. :
=> the headline will be only there if there is a link of this type. that would be OK if it would only display once. but it displays as many times as there are links of this type.



Is there a variable with which i can determine (outside the <!-- BEGIN linktype..) which link types are in that category i'm currently in?
So i would then write sth like
if linktype x is in this category, write headline <b>linktype x</b>
if linktype y is in this category, write headline <b>linktype y</b>
...

but i don't get {totalXlinks} workin as i told above sad

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 16, 2007 - 10:06 PM:

i put <IF {TOTALLINKTYPEXLINKS}>the linktypeX headline</IF> (in multilanguage displaylinks.tpl) above the <!--BEGIN "linktypeX".. :
=> the headline will also be displayed if there is no link of linktypeX


No, it won't. That's the whole point of the conditional. 0 is false.

{SHOWTYPEX} is an alternative syntax which is already in your template, actually.
Starship-Trooper
Experienced

Usergroup: Customer
Joined: Jan 06, 2007

Total Topics: 33
Total Comments: 84
#10 - Quote - Permalink
Posted Feb 17, 2007 - 10:30 AM:

marvellous.
now it works.

seems i got sth wrong all the tme before, don't know exactly what. I had to play around with it quite a while..

Thank you very much!

Starship-Trooper
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.