Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2010-02-11 12:22:29

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

I have another issue that I hope you can help me with, when a user goes to /archives I would like a list of articles from the current month, but when they click the date_menu items, I would like proper results to appear instead.

I have tried to introduce variables so that when a given url is correct, the form does one thing, to no avail. You can also see that I have an article_custom that grabs the current month’s articles.

My code is this:

<txp:variable name="archive" value='<txp:site_url />archives/' />
    <txp:if_variable name="archive" value='<txp:site_url />archives/'>
    	<txp:article_custom limit="999" wraptag="ul" break="" month='<txp:php>echo date("Y-m");</txp:php>' sort="Posted desc">
    		<txp:if_different>
    			<li class="month"><h4><txp:posted format="%B" /> <txp:posted format="%Y" /></h4></li>
    		</txp:if_different>
    		<li>
    		    <p class="title"><txp:permlink><txp:title /></txp:permlink></p>	
    		</li>
    	</txp:article_custom>
    <txp:else />
        <txp:upm_date_archive form="archive_view" mode="smart" heading_level="4" include_date="no" sort="the_year desc, the_month desc, the_date desc" />
    </txp:if_variable>

What am I doing wrong? Is there a better way to achieve this? Many thanks

Last edited by rathersplendid (2010-02-11 12:23:40)


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#170 2010-02-11 12:26:54

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Nope, it’s a quirk of how the /title scheme works.

If I use mode=“full”, I get the archive list (apm_date_archive) working but when I want to have a single month displayed by clicking an item on the upm_date_menu list, the same appears (2 months worth of posts)

That’s because full is being used: that tells the plugin to display a list of all articles all at once. It’s really intended that the menu tag doesn’t get used when you use that mode.

When I update this plugin, I’ll make it so that you can optionally have the most recent month of articles displayed if no specific month has been requested.

Offline

#171 2010-02-11 12:30:39

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

that would be awesome, thanks! I guess I’ll post my question in the How do i..? forum for now. Cheers


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#172 2010-02-11 13:49:25

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Mary, I managed to fix my problem with a surprisingly simple solution, instead of linking to /archives, I have linked to /archives/<txp:php>echo date("Y-m");</txp:php> which link to the current year-month as I needed.

Thanks again, can’t believe I didn’t think of it sooner!


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#173 2010-07-31 19:41:26

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

is there a setting to wrap the heading and the list into one div? if the two are separated it’s hard to style the archive.

Offline

#174 2010-08-01 13:17:53

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

No there isn’t. I had assumed that most styling could be done by being clever with CSS selectors, if necessary.

Otherwise it would seem that your needs are more complex, so building the archives yourself would be the best route (use article, if_different, etc – I think there’s explanations of how to do this on the Txp Tips site).

Offline

#175 2010-08-01 16:18:31

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

yep i tried that first
i’m getting so close! ha

Offline

#176 2010-08-25 18:31:04

playzea
New Member
Registered: 2010-08-25
Posts: 3

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

I’m having an odd problem on my archive page.

Notice in the 2010 line that “may” are repeated and it dose not show 2010 but show 2009 repeated instead

Any ideas? Can i fix this

i use txp 4.0.8 and upm_date_archive v.0.2.5

Offline

#177 2012-08-13 10:29:12

skywise
New Member
Registered: 2012-08-13
Posts: 5

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

I have trying to find out if you can format the list… but can’t seem to get a clear idéa of how it is done…probably the simplest thing… can anyone help me out? I want the menu to look like this:

2012
August
July
June
Etc.

And not like this

2012
(lots of space) August
(lots of space) July
(lots of space) June
(lots of space) Etc.

Last edited by skywise (2012-08-13 10:31:13)

Offline

#178 2012-08-13 11:05:33

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,310

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Can it be fixed with CSS?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#179 2012-08-13 11:28:26

skywise
New Member
Registered: 2012-08-13
Posts: 5

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Can’t seem to get it to react at all by changing the css in the file :/

Offline

#180 2012-08-13 11:59:17

skywise
New Member
Registered: 2012-08-13
Posts: 5

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Fixed it! :)

Set the class name to “nospace” and added the following to the css:

dl.nospace
{ margin: 0; padding: 0;
}

.nospace dt
{ margin: 0; padding: 0;
}

.nospace dd
{ margin: 0; padding: 0;
}

Offline

Board footer

Powered by FluxBB