categories: how to?
Posted: 05 July 2009 05:14 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  151
Joined  02-18-2008

I have a simple task:

1 x weblog “random_image” and then several categories the first “home” already assigned.

{exp:weblog:categories weblog="random_image"}
{exp
:imgsizer:size src="{home}" width="584" }
{
/exp:weblog:categories}

After reading through the user guide this should work… nothing is loading. I can load directly from the weblog but want the category.

any ideas?
cheers Lance

 Signature 

Lance Elliott

Designer
Sydney, Australia

http://www.independentdesign.com.au

Profile
 
 
Posted: 05 July 2009 10:31 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  951
Joined  06-24-2007

Try this in your template…

{exp:weblog:entries weblog="random_image" limit="1" dynamic="off"}
{exp
:imgsizer:size src="{home}" width="584" }
{
/exp:weblog:entries}

... it should output the latest image your added to the random_image weblog

 Signature 

Rob - http://www.blue-dreamer.co.uk/ - because I like blue!
EE Pro Network member

Profile
 
 
Posted: 05 July 2009 06:09 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  151
Joined  02-18-2008

Unfortunatly that does not return a result :(

To be clear I have a category called “home” and a custom field called “image” Your code works fine with “image” but I want to isolate the category entry.

Essentially I am running a random image fading script and the client needs to upload and choose which category the image belongs to.

 Signature 

Lance Elliott

Designer
Sydney, Australia

http://www.independentdesign.com.au

Profile
 
 
Posted: 06 July 2009 02:50 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  151
Joined  02-18-2008

OK, I seem to have figured it out…

{exp:weblog:entries weblog="random_image" category="23"}
{exp
:imgsizer:size src="{image}" width="584"}
{
/exp:weblog:entries}


Substituting category=“home” instead of category=“23” I hoped would work but does not.

so all is good, hope this helps someone sometime.
Lance

 Signature 

Lance Elliott

Designer
Sydney, Australia

http://www.independentdesign.com.au

Profile
 
 
   
 
 
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 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120466 Total Logged-in Users: 64
Total Topics: 126544 Total Anonymous Users: 24
Total Replies: 665385 Total Guests: 319
Total Posts: 791929    
Members ( View Memberlist )
Newest Members:  DistrikerGerd Pansenneilgroomart.maniaakoloans5kmotion1jelevinlizandermagnosismx2428