Log in | Register | Lost password

Bottom
Problems when using multiple list template
  • Posted: 04.03.2008, 20:46
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Hello, my latest post was in the "pagesetter help" forum and I received excellent advices. Now I have a problem that I hope that someone can help me with.

    I?m working on a website that will be used to show available office-space and storage? Eventually J

    Now I have a problem that Im trying to solve. Im using one publication-type for handling all objects with information and pictures and a bunch of other data. The publication-type has the value tid 1. And my publication-type uses one ?default-set? of templates, named PN-News.


    I have chosen to show four objects on my frontpage.

    Now, I want the visitors to be able via a link on the frontpage to view ?all publications? and then displaying them in groups of ten. Further more, on this ?all publication?-page I only wanted to show the title-field in the list.

    So, my solution on this problem was as following:

    I wanted to use pagesetters multiple list template and created a new set of three templates header/list/footer combination and named them:

    Display-News-list-header.html
    Display-News-list.html
    Display-News-list-footer.html

    My next move was to invoke my new set of templates with the strong desire that they would show my publications in a list of ten only showing the title-field. I used this url to invoke the templates:

    /index.php?module=pagesetter&func=viewpub& pubcnt =10&tid=1&tpl=Display-News-list.html

    Well, the error message I get is the following:

    Missing argument 'pid' or 'id' in 'pagesetter_userapi_getPubFormatted'

    Can I make this solution work or do I have to go around this problem another way?
  • Posted: 05.03.2008, 03:48
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I know that you do not need the ".html" in the tpl= argument. I also believe(but could be wrong, so correct me if I am) the templates should be named more like News-Display-list-*.html where the tid name is first followed by template name, then header/footer. Then I think it is invoked using "tpl=Display-list" and the engine fills in the rest of the info.

    Let me know if this works for you.

    Take Care,
    Mike
  • Posted: 05.03.2008, 07:45
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Thank you very much. I will try theese things and let you know if it works.
  • Posted: 11.03.2008, 15:31
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Hello! It took me a while to bring feedback into the forum, sorry. This was an intricate problem for me 
    Im still having big problems in using the list view in Pagesetter. I still cannot make my publications now using a set of templates named ?PN-News? to display in a list-view using an alternate set of templates (xxxx-list-header.html, xxxx-list.html, xxxx-list-footer.html)

    My purpose with this is ?alternative set? of templates is that I want to be able to let them show ?all publications? or ? 50 latest publications? using the parameter ?pubcnt?.

    My ?standard? set, PN-News is used to display the five latest publications on the frontpage and then in that listview, I am forced to display my publications in sets of five.

    That is basically the problem Im trying to solve.

    I have tried to invoke my alternate set of templates with a link and tried the modifications you suggested, but I still get the same error-message:

    Missing argument 'pid' or 'id' in 'pagesetter_userapi_getPubFormatted'

    I suspect that Im building the url wrongly. Is there any example of a string containing a example template-name Using the viewpub/pubcnt/ tpl correctly, like:

    index.php?module=pagesetter&func=viewpub& pubcnt =10&tid=1&tpl=exampletemplate-list


    Thanks!
  • Posted: 11.03.2008, 20:58
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I see a problem, part of your URL is "func=viewpub", and that is the function for a view a single pid rather than a list. You can find a list of func paramiters HERE. If you are outputting just a list you can drop the func arg all together.

    Take Care,
    Mike
  • Posted: 12.03.2008, 21:30
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Hey, now im getting ALMOST everything to work. Well, the pubcnt parameter anyway. But pagesetter still do not want to use my new templates for the list view. my new set of templates are simply called:
    Test-list-header.html
    Test-list.html
    Test-list-footer.html

    And i want pagesetter to use them for the listview adding the ?&tpl=Test-list? to the url. It still gives me the errormessage:

    No template found

    Expected template filename: PN-News-Test-list-header.html / PN-News-Test-list.html / PN-News-Test-list-footer.html


    And pagesetter is adding the name of my default-set of templates (PN-News) before the name of my new set of templates.

    Any Idea how to solve this?



  • Posted: 14.03.2008, 04:37
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    It looks like your templates aren't named properly.

    Edit your publication type and take a look at the "Template" variable near the top right of the page.

    This is what's used for the naming of the templates for that publication type.

    If the template variable was set to "PN-News" and you're specifying in the URL that you want to use the template "Test-list" (tpl=Test-list), then the filenames should be:

    PN-News-Test-list-header.html
    PN-News-Test-list.html
    PN-News-Test-list-footer.html

    Another example.....

    If the template variable was set to "Events" and you specificed via the URL that you wanted to use the tempate "sports" (tpl=sports) then the filenames would be:

    Events-sports-header.html
    Events-sports.html
    Events-sports-footer.html

    Both of these examples assume that your are displaying a list.

    I'll stop here to prevent confusion.
  • Posted: 17.03.2008, 19:53
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    That was a good idea. My templates wasn?t named correctly and naming them according to your pattern worked like a charm.

    Thank you for your time.

Template courtesy of Designs By Darren.