Fork me on GitHub

PageMaster template output problems in block (solved)  Bottom

  • Stuck, using PageMaster 0.4.2 and Zikula 1.2.4. I have successfully created a Publication type and its fields, updated the DB, generated the code, and pasted the code into the three htm files which I put in the appropriate directory in my theme. Changes made to the htm file results (as long as I remember about clearing caches) in changes in the output, except when I create a separate block for the output. The output in the block shows what appears to be the raw and unchanged output from the original htm file.

    It isn't theme related (I've tried 4 themes). I assume it has to do with the block using viewpub which refers to viewpub.php and not a template. If this is correct, then I just have to tell the block to use the correct template - but I have not found the magic word yet. This must be simple. If someone helps me figure this out, I'll update the Wiki documentation.

    --
    Peace
    ______________________________________
    The commonest cause of problems is solutions.
  • Here's an example of a site I recently created:
    • In the block settings, I set the "template" field to: block_pages_left
    • The block template is actually called: publist_block_pages_left.htm

    So I'm assuming it would use a similar syntax for viewpub.

    --
    Harness Technology
  • Thanks Wendell, but not yet solved. My output template is:
    • /themes/mytheme/templates/modules/Pagemaster/output
    • and is named viewpub_tract_out.htm (when I edit this template, the changes appear in the publication as accessed through a publist block, but not when I put a new block as a center block on the home page)


    I have tried:
    • block_viewpub (it is what appears by default)
    • block_viewpub.htm
    • block_center_viewpub
    • block_center_viewpub.htm
    • center_block_viewpub
    • center_block_viewpub.htm
    • viewpub_tract_out.htm
    • viewpub_tract_out


    I'm running out of things to try. I hate to fall back to using News, but it is beginning to appear that I will have to.

    (Edit: Interestingly, when I modify the publist template, those modifications do not show in the block I created for the list of publications, where the template name defaults to block_list. So it appears that my concern is more generic than I thought - I do not know how to make PageMaster blocks use a template of my choosing. I suppose I can try putting a path in. Someone out there must know the answer to this.)



    Edited by pheski on Nov 14, 2010 - 04:32 PM.

    --
    Peace
    ______________________________________
    The commonest cause of problems is solutions.
  • SOLVED

    I looked at the HTML source generated and found it was coming from var:viewpub_template_code and search for that string in PageMaster lead me to lines ~ 197 - 220 in PageMaster/pnuser.php which begins, not surprisingly, with //determine the template to use.

    Working from that it was a small leap to trying 'tract_out' and 'tract_in' for the template names. Works fine. I'll add to the documentation.

    rofl

    --
    Peace
    ______________________________________
    The commonest cause of problems is solutions.

This list is based on users active over the last 60 minutes.