2 of 13
2
Custom Fields in {exp:weblog:entries /}
Posted: 22 September 2006 09:27 AM   [ Ignore ]   [ # 19 ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

Hi Mark,

It now works with hyphens in the custom field name, but doesn’t display anything if I limit the results.  Is this beyond the scope of the extension?

cheers, Jamie

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 22 September 2006 09:33 AM   [ Ignore ]   [ # 20 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

That’s great it’s working with the hyphen, however it should work with the limit also.  I will investigate.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 23 September 2006 06:59 AM   [ Ignore ]   [ # 21 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Limit will not work based on the core functionality of EE.  So I am planning on including my own limit field, something like ext_limit=“10” but for now I would (if you have the processing power) leave out the limit and put a conditional check in at the beginning to check the count: {if count < 10}{/if}

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 23 September 2006 08:22 AM   [ Ignore ]   [ # 22 ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

Thanks Mark, I look forward to it.

Just as an aside, I don’t think using the {count} variable is going to work in the short term either for me.  I have 12 entries, 2 of which have the custom field ‘casestudy-featured’ set to Yes.

When I run…

{exp:weblog:entries weblog="studies" casestudy-featured="Yes"}
{count}
{
/exp:weblog:entries}

...the 2 entry’s count variables output as 7 and 10, not 1 and 2 as you’d expect.

I’m gonna go back to using {if casestudy-featured} for now.  thanks for your help so far though smile

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 23 September 2006 08:30 AM   [ Ignore ]   [ # 23 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Thanks for helping me debug a little further.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 23 September 2006 08:43 AM   [ Ignore ]   [ # 24 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I’ve updated the extension again and instead of using limit=“10” you can use max=“10” and that should give you the entries you’re expecting.  The only thing to be careful of is to make sure max=“10” comes before any of your custom field declarations.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 23 September 2006 08:59 AM   [ Ignore ]   [ # 25 ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

I’m sorry Mark.  Using…

{exp:weblog:entries weblog="studies" max="1" casestudy-featured="/Yes/"}
...
{/exp:weblog:entries}

...lists all the entries.

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 23 September 2006 09:04 AM   [ Ignore ]   [ # 26 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

try the max=“1” behind the custom field call, it should always be at the end, not the beginning.  my mistake.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 23 September 2006 09:10 AM   [ Ignore ]   [ # 27 ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

sorry should have said.  tried that…

{exp:weblog:entries weblog="studies" casestudy-featured="/Yes/" max="1"}
...
{/exp:weblog:entries}

...and it displays all the entries with casestudy-featured set to Yes.  So almost like it simply ignores the max parameter.

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 23 September 2006 12:00 PM   [ Ignore ]   [ # 28 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Alright, sorry this has taken so long.  I had all but given up hope for this extension, but here it is again.  Another release that should fix the max problem.  Download it again from the first post in this thread.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 24 September 2006 04:20 AM   [ Ignore ]   [ # 29 ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

Mark, something not quite right going on smile

There are 10 entries, 3 are set to Yes on ‘casestudy-featured’. (I’m not sure if those numbers actually relate to the problem or not).

I just want to display one entry that has been set to yes.

{exp:weblog:entries weblog="studies" casestudy-featured="/Yes/" max="1"}
...
{/exp:weblog:entries}

That displays nothing.  Change the max value to anything up to 4 and still nothing displays.

Change it to 5 and 1 entry displays.  Change it to 6 and 2 display, 7 and 3 display.  Anything above 7 and 3 display (the maximum number of entries set to Yes).

Hope that helps.

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 31 October 2006 01:57 AM   [ Ignore ]   [ # 30 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12273
Joined  04-29-2002

I’m trying it too. The max is working for me, but pagination isn’t.

Or is it supposed to?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 31 October 2006 07:10 AM   [ Ignore ]   [ # 31 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

I haven’t looked into pagnation.  I’ll take a peak now though.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 07 November 2006 10:42 PM   [ Ignore ]   [ # 32 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

Alright, I took the extension to fat camp and came up with a much leaner, faster, more optimized extension.  The only condition is that you have to modify your ‘mod.weblog.php’ file to allow the extension hook.  You can find instructions for that in the top of the .php file.  Other than that pagination, limits, and any other {exp:weblog:entries /} should work now.  Grab the EXT at the top of the thread.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 22 November 2006 02:51 PM   [ Ignore ]   [ # 33 ]  
Summer Student
Total Posts:  30
Joined  12-30-2003

Seems to work like a charm. Thank you very much.

Would it be difficult to apply this also to exp:weblog:prev_entry and exp:weblog:next_entry?

 Signature 

Still blogging after all those years.

Profile
 
 
Posted: 02 December 2006 04:07 PM   [ Ignore ]   [ # 34 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

hum, as a workaround for now you might want to try replacing exp:weblog:prev_entry and exp:weblog:next_entry with normal exp:weblog:entries tags switching the sort and limiting by 1?  I’m not sure just how well that will work, but it’s alternative.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 22 December 2006 01:18 AM   [ Ignore ]   [ # 35 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  420
Joined  10-10-2004

I can’t seem to make this limit at all. I’ve tried a few different combos but it just outputs every entry in the weblog. Am I doing anything noticably wrong below?

{exp:weblog:entries  weblog="homepage_top_story"  test_field="one"}

    {title}
<br><br>

{/exp:weblog:entries}

I assume if I have an input field or drop down field (one or the other) that has “one” in it, that all those entries will show up but those without that text will not. I would use this right now if it worked for me.

Any help is appreciated. Thanks!

Profile
 
 
Posted: 22 December 2006 06:49 AM   [ Ignore ]   [ # 36 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1183
Joined  01-05-2006

You’ll want to make sure you update your weblog files as described here: http://expressionengine.com/forums/viewthread/38371/P18/#187855 and in the top of the extension.  Have you done that?

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
   
2 of 13
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64534 Total Logged-in Users: 22
Total Topics: 81113 Total Anonymous Users: 25
Total Replies: 436433 Total Guests: 194
Total Posts: 517546    
Members ( View Memberlist )
Newest Members:  bluespotmusicvolandspinhirnetheminiokostiamasterjeMBossbchaleyalvonsiuscwestfall