Help - Search - Members - Calendar
Full Version: Display most recent entry's title on my website?
Movable Type Community Forum > Additional Resources > Tips and Tricks
konakevin@hotmail.com
I read the entire forum and was unable to find a solution to my problem.

On my site, http://www.themchenrys.com, I have a section dedicated to my blog, but it isn't my main index page. I want to automatically display the most recent entry's title on my main index.html page that would allow a user to click on the title and go to the blog entry.

This would be handy because then users could see what the most recent blog entry was without having to click on my 'blog' link every time. I would have a little section called "Most recent blog entry" and then display the title that I get from my most current post to my blog.

My index.html file and my moveable type code are in completely different directories.

Does anyone know if this can be done? If so, please help me! Any help would be GREATLY appreciated.

Thanks,

Kevin
simoncox
If you are using the MySQL version it would be very easy to just make a call to the dbase and collect the headline and link.

Otherwise you will have to make your page an index page and have the mt code in it and rebuild the page everytime you add a story = pain - thats not ideal right but fundementally you have to get the info onto your family home page somehow and thats by either regenerating the page evertime you add a story or by doing a dbase call.

Hope that gives you some pointers.
konakevin@hotmail.com
I don't have MySQL running on my site, so I can't use the MySQL version of MT.

What I need to do is read the MT tags from an external directory. Is there any way to write a little PHP, or Java script that would be embedded in my index.html page that would go out and read the MT tag for the latest entry in my blog?

Does anyone know how to do this, or if it's even possible?

Thanks again,

Kevin
Craige
Hi! My question is similar and perhaps simpler, I'm not sure.

On my site, I have my main blog and then I have 3 other blogs that I don't update as often: recipes, books, film. What I'd like to do is have the date of the latest one of those appear on my main blog page next to the links to the other blogs. I can't get my brain around how this would be done. Any suggestions would be appreciated.
Craige
Well, my bad. After posting this, I searched around and found the info on MTOtherBlog. I believe that is what I want to use, right?
charle97
yes, using the otherblog plugin is one method.
charle97
QUOTE (konakevin@hotmail.com @ Jun 20 2003, 09:25 AM)
I don't have MySQL running on my site, so I can't use the MySQL version of MT.

What I need to do is read the MT tags from an external directory.  Is there any way to write a little PHP, or Java script that would be embedded in my index.html page that would go out and read the MT tag for the latest entry in my blog?

Does anyone know how to do this, or if it's even possible?

Thanks again,

Kevin

create a new template that will output the entries you want to show to a text file. and then use a php include to include the the text file.

skeleton code for your new template:
CODE
<MTEntries lastn="1">

code for to show title as a link

</MTEntries>


you can also control where the file will be written by appending an absolute path to the file name in the output file field.
konakevin@hotmail.com
Thank you! That is exactly what I was looking for, and I think it will work great!

I will try it tonight when I get home from work.

Kevin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.