Perhaps somehow can help me with this. I have a site that is set up like this:
http://www.saildivebvi.com
I have had a blog for several years, but I have never been able to match it too well to the site. it is at
http://www.saildivebvi.com/serendipity
I have just put another blog on the site at
http://www.saildivebvi.com/charterblog
My site is set up with project seven page packs and PMM and the stuff comes in SSI.
I would like to have the content on my blog come into the maincontent section of my page. Despite reading the pages on here about wrappers, and editing the tpl for the particular design, my head does not seem to be able to grasp how to do this.
I have asked on the Project seven forums, and no one seems to be able to help there.
I am pretty good with HTML, but have only started tutorials on PHP so understand the basics but that is about all.
Does anyone have any ideas ??
pulling in blog content into my web site template
Don has a lot of experience with this kind of thing. He may be able to help.
Meanwhile, let me assure you that you don't need to know *any* PHP to make a Serendipity template. All you need is Smarty, a standard template language, and CSS, the styling language of the web.
A Smarty template looks a lot like HTML; in fact, it is HTML, with logic added.
If you already know HTML, you probably already know CSS, too.
In Serendipity, the index.tpl controls the contents of the main page. It's where you set up the <HEAD>, the banner, the sidebars, and the entry container. You'd also add a menu bar or footer bar if you wanted one.
The entries themselves are controlled by the entries.tpl (obviously enough). This is where each entry title, entry text, and entry footer are added.
We even have a fallback mechanism: if Serendipity needs to call a .tpl that isn't available in the current template, it calls the one in the default/ directory.
I'd recommend starting with the Smarty website up for reference, then examine the index.tpl and entries.tpl for a template you like; preferably something close to the template you want to achieve. (Nice looking site, by the way.) From them you can see how the HTML is created and Serendipity's generated content is inserted.
There's a lot more than you really need, of course; the default template has to account for every possibility. Serendipity might be embedded, in which case it shouldn't print its own <HEAD> section, for instance. There's an {if} in the index.tpl to handle that. You can probably still follow the logic, because the variables are usually defined in plain, explanatory English.
I think once you see how Smarty works, you'll be able to duplicate your site's appearance with no problem. And we'll be happy to help you with any questions along the way.
Meanwhile, let me assure you that you don't need to know *any* PHP to make a Serendipity template. All you need is Smarty, a standard template language, and CSS, the styling language of the web.
A Smarty template looks a lot like HTML; in fact, it is HTML, with logic added.
If you already know HTML, you probably already know CSS, too.
In Serendipity, the index.tpl controls the contents of the main page. It's where you set up the <HEAD>, the banner, the sidebars, and the entry container. You'd also add a menu bar or footer bar if you wanted one.
The entries themselves are controlled by the entries.tpl (obviously enough). This is where each entry title, entry text, and entry footer are added.
We even have a fallback mechanism: if Serendipity needs to call a .tpl that isn't available in the current template, it calls the one in the default/ directory.
I'd recommend starting with the Smarty website up for reference, then examine the index.tpl and entries.tpl for a template you like; preferably something close to the template you want to achieve. (Nice looking site, by the way.) From them you can see how the HTML is created and Serendipity's generated content is inserted.
There's a lot more than you really need, of course; the default template has to account for every possibility. Serendipity might be embedded, in which case it shouldn't print its own <HEAD> section, for instance. There's an {if} in the index.tpl to handle that. You can probably still follow the logic, because the variables are usually defined in plain, explanatory English.
I think once you see how Smarty works, you'll be able to duplicate your site's appearance with no problem. And we'll be happy to help you with any questions along the way.
-
Don Chambers
- Regular
- Posts: 3659
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
OK:
That is a start, I shall throw away the PHP tutorials and go over to the smarty instead and see where that takes me...I thought if I had to wait until I learnt PHP it would be a long time before I got this looking how I wanted.
I am sure I will have a billion questions.
Thank you.
Its ok, I am female, so I don't really work well on logic anyways (so my husbands would say!) so Smarty and I may get along..
That is a start, I shall throw away the PHP tutorials and go over to the smarty instead and see where that takes me...I thought if I had to wait until I learnt PHP it would be a long time before I got this looking how I wanted.
I am sure I will have a billion questions.
Thank you.
Its ok, I am female, so I don't really work well on logic anyways (so my husbands would say!) so Smarty and I may get along..