Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Inserting articles into current page

 

 


dondemaio
New User

Jul 26, 2009, 10:26 AM

Post #1 of 7 (3852 views)
Shortcut
Inserting articles into current page Can't Post

Hi. New guy here.

I want to insert articles into my current home page at http://www.uusarasota.com. Can anyone tell me what code to use to do that?

Thanks.

Don

(This post was edited by dondemaio on Jul 28, 2009, 7:08 PM)


Theo
Project Manager / Moderator


Jul 28, 2009, 11:17 AM

Post #2 of 7 (3783 views)
Shortcut
Re: [dondemaio] Inserting articles into current page [In reply to] Can't Post

Thanks for posting, Don.

That link isn't working, so I can't get a perfect idea of what you're trying to do. :D

From the sounds if it, you've installed Article Manager already, and you want to add a list of headlines to your home page, linking to the articles you're publishing elsewhere. Sound about right?

What I'd do is:

1) Create a very simple template listing my headlines. Something like:


Code
<!-- template insert : $articleList$ --> 
<!-- templatecell : articleRow -->
<p><a href="$published.articlePage.url$">$article.title$</a></p>
<!-- /templatecell : articleRow -->


2) Save it as "headlines.html" and upload it to [artman cgi folder]/templates/articleLists/

3) Create a new Publishing Rule in Admin > Publishing
- Click the "Create" button and name your new rule "Headlines"
- Rule Type: "a list of articles"
- Template: select your new /templates/articleLists/headlines.html file
- Placeholder Set Name: headlines
- Publish the headlines as "One File" and call it "headlines.<ext>"
- Save the new rule, and then click the "publish" link next to it in your list.

3) Add a server side include to your home page.

<!--#include virtual="/[ARTMAN PUBLISH FOLDER]/headlines.shtml" -->

4) You might need to change your home page to be index.shtml to get includes working with it. Then you can work with your headlines template to tweak the design, etc, or add other article fields like $article.summary$ or the category associated with it.

Hope that helps, Don! Talk to you soon. :)

Regards,


Theo Wiersma
Project Manager


Theo
Project Manager / Moderator


Jul 28, 2009, 12:03 PM

Post #3 of 7 (3781 views)
Shortcut
Re: [dondemaio] Inserting articles into current page [In reply to] Can't Post

Just a quick addendum:

If you're home page is index.php, your include will look more like this (please note the lack of slash at the beginning of the path):

<?php include('[ARTMAN PUBLISH FOLDER]/headlines.shtml')?>


Theo Wiersma
Project Manager


dondemaio
New User

Jul 28, 2009, 12:24 PM

Post #4 of 7 (3780 views)
Shortcut
Re: [Theo] Inserting articles into current page [In reply to] Can't Post

Hi, Theo.

Thanks for the help.

When I insert the php include you reference:

<?php include('[ARTMAN PUBLISH FOLDER]/headlines.shtml')?>

I get an error saying that there is no such file. When I look at my directory "artman2" I can't see the index.php file there. Is it possibly in another directory, such as "artman2/publish/"

Don

(This post was edited by dondemaio on Jul 28, 2009, 12:27 PM)


Theo
Project Manager / Moderator


Jul 28, 2009, 12:29 PM

Post #5 of 7 (3776 views)
Shortcut
Re: [dondemaio] Inserting articles into current page [In reply to] Can't Post

Sorry, Don, I thought you wanted to put the headlines right into your home page? If so, then you'll want to modify your home page itself.

Make sure you're replacing [ARTMAN PUBLISH FOLDER] with the exact path to your publishing folder, i.e.

<?php include('artman2/publish/headlines.shtml')?>


Theo Wiersma
Project Manager


dondemaio
New User

Jul 28, 2009, 12:40 PM

Post #6 of 7 (3775 views)
Shortcut
Re: [dondemaio] Inserting articles into current page [In reply to] Can't Post

I think I'm on the right track now. Take a look at the lefthand column on http://www.uusarasota.com/indexNew.php

Now all I need is the placeholder for the "read article" link at the end of the article. Can you help me out there?

Thanks.
Don


Theo
Project Manager / Moderator


Jul 29, 2009, 10:27 AM

Post #7 of 7 (3744 views)
Shortcut
Re: [dondemaio] Inserting articles into current page [In reply to] Can't Post

Hey, looks like you've figured out how to link to your articles, Don! Congrats. :)

Your next step is probably to customize the articlePages/articlePage.html template with the design of your site. Let us know if you have any further questions! Wink


Theo Wiersma
Project Manager