Fork me on GitHub

Can someone give me some schooling on simpleTemplate?  Bottom

  • First off, I wasn't quite sure whether this question should be here or in the Modules forum, so if I'm in the wrong place, apologies and please feel free to move as necessary.

    I've got a vague idea of how I want the homepage for my site to look, but since I am a relative novice with this stuff, it entails a lot of "playing" with things. I had been experimenting with the Content Editing module, but it wasn't quite flexible enough. I then stumbled upon simpleTemplate, which seems like it is perfect for what I want to do.

    So I created my template page, and figured out the URL to call it properly. Good so far. Now, all I really want to do is have it display some premade blocks, which I thought I could do with just this code:

    Code

    <!--[blockposition name=simpleleft]-->
    <!--[blockposition name=simpleright]-->
    <!--[blockposition name=simplefull]-->


    Once the blocks display, I can then mess with the CSS to place/format them. I've got blocks assigned to each of those positions; however, nothing displays, so I am clearly doing something wrong. Can anyone point me in the right direction?

    Thanks,
    -Bill
  • First off, how is Content not flexible enough? I'd actually say it's MORE flexible than SimpleTemplate?

    And if this is for the Home Page, you don't even need SimpleTemplate, just set home to a Static Home Page, and create acustom layout for Home.html



    edited by: HalbrookTech, datetimebrief

    --
    Home Page | Find on Facebook | Follow on Twitter
  • HalbrookTech

    First off, how is Content not flexible enough? I'd actually say it's MORE flexible than SimpleTemplate?


    And it is extremely likely that you are correct. Here again, I cheerfully play my novice card - to give you an idea of my design savvy... if we were talking about auto mechanics, I'd be that guy who has had that car up on blocks in his driveway for 2 years and keeps saying how great it's gonna run once he gets the kinks worked out icon_wink . Anyway, the sense I got from Content is that it works wonderfully for manipulating pieces of content within its premade options, but simpleTemplate seemed like more of an open playground (had I been able to figure it out), if that makes any sense...

    HalbrookTech

    And if this is for the Home Page, you don't even need SimpleTemplate, just set home to a Static Home Page, and create acustom layout for Home.htmledited by: HalbrookTech, datetimebrief


    Aha. This seems much more simple than any of the other things I had tried. Will check it out, and will almost certainly have more questions as I stumble through this - in the meantime, thanks very much HalbrookTech for your help...

    -Bill
  • Just confirming that HalbrookTech's suggestion was indeed the way to go for this - much easier than what I was trying to do. My next task is to make it so the home page doesn't actually say "Home", but since this is my only page in Static Pages, I'm guessing I can just edit the template and get rid of the part that displays the header.

    Thanks again,
    -Bill
  • You can create your own layouts for Content almost as easilly as for any other module. It's a bit trickier, because you have to create a layout, layout API and edit template, but if you can disect a regular template, it's not too bad. And the advantage with Content is that you only have to create the template once and then you can reuse it later.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Layout API is probably exactly where my knowledge gap resides (again, not a programmer by any stretch). And, being able to reuse something is always good. My issue that started this thread has absolutely been resolved, but I'd really like to learn more so's I can maybe do more one day - any chance you could point me towards a resource? If not, no worries, you already helped me out...

    Thanks,
    -Bill
  • It depends on how your mind works on things like this. For me, I was able to look at the stuff that comes with Content, and create new ones from that (and even with me grasping it, I had one layout that broke things with the menu system). http://new.peopleschurchvancouver.org is 99% created with Content and some custom page layouts. The only things that aren't are the home page and the calendar. All the ministry pages and about us pages are created with it.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • It might be nice if Content had some more options in the package to start with. The 2 column layout for example is now a "static" 50% | 50%. I made variations on that as well. The choice of 66 | 33 and 33 | 66 would be great for example icon_smile But I agree Content is a great module and the layoutapi is very usable IMO. But I do have a good understanding of the stuff, so then it's hard to think about how one would use it if you don't know the details icon_smile

    edit: I have added my comments to http://code.zikula.org/content/ticket/98 and once I have some of them I will add them to the ticket.



    edited by: espaan, datetimebrief

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • I'd like to see some doc blocks in the API files for the layouts so I'd better understand exactly what I'm doing, I get the idea, but as seen on my church's site, one of my layouts had some sort of error that added a blank line above the menu when I used one of the dropdowns and menutree's content menu plugin. I'd also like to assign a category to a content page, and have blocks like news, postcal, etc be able to just by default pull data from the same category, but that's me, and probably a task for the developers of the modules more than content. :)

    --
    Home Page | Find on Facebook | Follow on Twitter
  • HalbrookTech

    I'd also like to assign a category to a content page, and have blocks like news, postcal, etc be able to just by default pull data from the same category, but that's me, and probably a task for the developers of the modules more than content. :)


    Ya, I agree, that would be a very cool thing. I've been able to muddle together something kinda similar by creating a block that doesn't get used anywhere else on the site, and then putting a section in Content that pulls in that block, but it is a time consuming endeavor, and although it works ok now while the number of Content pages and Categories in my site is relatively small, it seems like it will become even more effort intensive as my content grows. Something that automatically displays items in the same category from other modules would be a huge time saver...
  • Well, you can assign a category to the page, and modules like News & PostCalendar provide content plug-ins, so it's just a matter of, I think, having the plug-in read the page's category and defaulting their own cat to that one. That said, I dunno if that info is presented so that the plug-in can use it.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Quote

    I dunno if that info is presented so that the plug-in can use it.

    I didn't find it as I was deving PC610
  • I had submitted a ticket to the Content project, but dunno how active development is on it at this time. Would be a handy feature, make it a bit easier to configure. BTW Installed RC1 of PC6.1 on a site, working well so far.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Carsten has done a lot of work on getting Content 310 out. I don't think there is an other active developer working on the tickets, but not sure.
    Content is a very good module to work with and has so many possibilities.

    --
    campertoday.nl, Module development, Dutch Zikula Community

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