Help - Search - Members - Calendar
Full Version: MonthArchive on Index + linking to Iframe
Movable Type Community Forum > Additional Resources > Tips and Tricks
dotpitch
Two questions (saves posting space?);


On my Indexpage I don't want to show the n-last entries, but immediately all the entries of the current month. What is the coding for this? I assume I can do away with all the MTEntries tags on the default templates?

And secondly, allthough I haven't decided yet on whether to use a Iframe on my page or not, I would like to know the coding to accomplish this. Would this work?:



CODE
<MTArchiveList>
<a href="<$MTArchiveLink$>" target="iframename">
<$MTArchiveDate$></a>
</MTArchiveList>
kadyellebee
You can set the preference in the Weblog Config under Preferences for "number of days to display": 30 will give you *about* a month smile.gif

And I think that you have the right idea for an iframe. Search the forums for iframe and I bet you'll find a bunch of topics where its been talked about smile.gif

Kristine
dotpitch
30 days would not work, because two months would overlap this way, and I don't want that. I could just link to the archive.html of that particular month, but than I woud have to change this link every month. I think there is an easier way, just can't figure it out.

And, yes, I read a lot about Iframes through the use of the search function on this site, but couldn't find information about the actual linking. The only thing I found was to set the src. of the Iframe to point to the main index page, but I wanted to call for some MT content from a button outside of that iframe.
Just to let you know I always search the forum before asking something.
stepan
If you're using monthly archives, then it's very easy:
CODE
<MTArchiveList archive_type="Monthly" lastn="1">
<MTEntries>
...
Entry content goes here
...
</MTEntries>
</MTArchiveList>


If you don't have monthly archives, you could use the DateTags plugin for this. Something like to following should work:
CODE
<MTEntries days="31">
<MTIfDateAfter date="[MTDate format='%m/1/%Y']">
...
Entry content goes here
...
</MTIfDateAfter>
</MTEntries>

The coding in your post would work correctly. Iframes behave pretty much the same way as regular frames and are targeted the same way, too. Oh, and 90% of the time they produce the same horendous looking and/or user-unfriendly (can't book mark them) pages. wink.gif
dotpitch
If you're using monthly archives, then it's very easy:
CODE
<MTArchiveList archive_type="Monthly" lastn="1">
<MTEntries>
...
Entry content goes here
...
</MTEntries>
</MTArchiveList>



thanks for this! It's what I was thinking off...


Curious about your Iframe statement: Why do you find it horrendous? And you can allways bookmark the whole thing by clicking once next to the iframe. Or do you mean the seperate page?
If you have any other idea how to keep the menu allways visible, let me know! I tried to load a new page into a
, but that doesn't work.
stepan
QUOTE (dotpitch @ Jun 20 2003, 05:18 PM)
Curious about your Iframe statement: Why do you find it horrendous? And you can allways bookmark the whole thing by clicking once next to the iframe. Or do you mean the seperate page?

In general, if you just have an iframe with static content, it's no too bad - I can bookmark the top level page. And then there is that scrollbar in the middle of a page that bugs me, but that's just a pet peeve of mine wink.gif

The problem becomes when you change the content of the iframe during navigation. The URL of the page doesn't change, but what's displayed does. Bookmarking only brings you back to the original page. It's the same problem as with regular frames.

Here is an old article that talks about this. Some of it is no longer applicable (every browser supports (i)frames these days) but a lot of it is valid.

With PHP or SSI includes, you can usually achieve the same functionality without the drawbacks of frames. BTW, posting a link to a page that shows what you're trying to do would helpful.
dotpitch
OK, I can see your point. And I'm not really familiar with PHP to make it work in another way. Perhaps with the CSS tag "position: fixed". I'll have to try that one.

At this moment you might say I'm studying MT and CSS, because my provider still hasn't installed a MySQL database for me. But in doing so I ran into a lot of possibilities of managing me "old" site from within MT.
Here is a look at how it is now (with the use of an iframe):
Spoenk

Be aware: it's in Dutch (but you only have to see the iframe offcourse tongue.gif )
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-2009 Invision Power Services, Inc.