Log in | Register | Lost password

Bottom
Caztegory "title" in list-header - is there a way to do this?
  • Posted: 12.01.2005, 11:29
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Now I've tried almost every combination to try to print out the category-title in the list-header.










    Most of the time absolutely nothing shows up (except when i wrote "hello" just to test if I was in the right template....). I got a fatal-error once, and that was when I tried to call with core.-start (I think) - oh, and once when I accidentally typed a colon instead of a dot. I've checked and re-checked my names.

    My
    publication type is called "Artiklar",
    the list i get the categories from "Artikelkategorier"
    the publicationfieldname calling the list "category"

    I've read and re-read the manual part about the list(categories) and how to call them, but the example isn't clear to me.

    -
    Using list items
    When refering to a list or category item you must further specify which property of the list item you want. You can choose between the title, the qualified title (with parent items prefixed), the value, or the description. The properties are accessed as sub-values of the field (just like the properties of the core variable).
    For instance, say you have a category field in your publication type called bookType. It is defined as a list called typesOfBooks. To add the title of the category field to your template, use "
    -

    To me it seems as if my Artiklar.title should work then, but it doesn't... So maybe it's the way I'm trying to use it that's wrong. Is it at all possible to get the header to print out the category-title in my list-views (Artiklar-list-header.html)?

    What am I missing??
    Please help me, someone who knows. I wish I knew more code-hacking, so this was as obvious to me as to everybody else

    Thanks in advance!
  • Posted: 12.01.2005, 11:57
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Categories belong to specific publications. So what should the header display? The category of publication 1, 2 or 3 or ?

    So, you cannot show categories (or any other pub.specific data) in header/footer.
  • Posted: 28.01.2009, 10:18
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Trick inside css
    Make class name the title of categories position:absolute and put all categories title in one place on the page (parent element must be position:relative)
  • Posted: 11.03.2009, 07:02
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Seems like you need to use some smarty magic... See, the category is there in your URL, so you need to read the URL parameter that filters your category and take away what you don't need.

    { $smarty.get.filter } (take away the spaces please)

    will read the filter value. you could assign it to a variable using

    { assign var="catString" value=$smarty.get.filter } (again, take away the spaces)

    now you have $catString and using |truncate you can take away whatever you don't need from it (using negative numbers should take away from the beginning of the string).

    Hope this helps!
    this

Template courtesy of Designs By Darren.