 |

ColinW-O
User
Jun 5, 2007, 11:53 AM
Post #1 of 8
(695 views)
Shortcut
|
|
Feature for Top Story, is this possible?
|
Can't Post
|
|
Okay, I make a big use of the Top Story feature on my site. It would be cool if I can add a picture in the top story page like CNN.COM does on their main page. Is the below possible? I want to add a drop down menu to the Article Manager posting page where this menu would have a list of images that are already uploaded on the server. When I create the new top story, all I would need to do is select the filename of the picture from the drop down menu and it would appear ONLY in the top story, but not in the actual article page. I use different templates for top story and article page so I guess with the inclusion of a placeholder or something like that in the top story template that would be possible. I just don't know if it's possible to add the drop down menu that calls the different images for me to choose. Any ideas? Thanks! Colin
|
|
|  |
 |

Donna
Staff
/ Moderator

Jun 5, 2007, 5:36 PM
Post #2 of 8
(684 views)
Shortcut
|
|
Re: [ColinW-O] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Hi Colin, Sure, why not? :) Create a new field in the database editor, with the type as "List". Make sure the "value" is set to the filename of the files you've already uploaded (ie, uploadedimage.jpg) and set the label to whatever you'd like to identify it to people adding articles. The rest of the options can be set as you'd like. Then, in your template, add something like this where you want the image to appear: <img src="/path/to/uploaded/files/$article.UploadedImage$"> If not all of your articles will have an image selected, you could even put it into a templateIf so it'll only appear if there's something in that field. Alternately, if you wanted to be able to upload an image for each article, you'd essentially use the Summary Images tutorial here: http://www.interactivetools.com/docs/doc.cgi?/articlemanager2/tutorials/summaryImages.html Let me know if that works for you, or if you have any other questions. :) Donna
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

ColinW-O
User
Jun 6, 2007, 8:52 AM
Post #3 of 8
(674 views)
Shortcut
|
|
Re: [Donna] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Donna, So if I want to add new images I have to go to the database editor and input the field for each file name right? Also for the value, is it the full path or a URL string? I only want the images to appear in those articles that are set as Featured Story on that particular template. So if anyone goes to the article let's say through the news page, I don't want it to appear there unless the featured story template is called. I guess that creates the problem of what should I select if there's no image attached to it, just create a blank value?
|
|
|  |
 |

Donna
Staff
/ Moderator

Jun 7, 2007, 11:24 AM
Post #4 of 8
(649 views)
Shortcut
|
|
Re: [ColinW-O] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Hi Colin, If you went with the drop-down method then yes, adding a new image would require updating the field itself in the database editor. You can set it up to be either the full path, the URL, or even just the filename itself if you have the path hardcoded into the templates. However you set it up, as long as the final result will get your image tag formatted correctly. :) I'd recommend having it default to a blank value, then setup a templateIf that says if there's nothing in the field, don't print the <img> code at all. Does that work for you? Donna
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

ColinW-O
User
Jun 7, 2007, 11:46 AM
Post #5 of 8
(647 views)
Shortcut
|
|
Re: [Donna] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Ok I set it up. I just used the filename in the value field and put the code in the featured story template using the templateif. Looks pretty sweet :) Check it out if you want, it's at http://www.wrestling-online.com Thank you for the help. As always, you IT guys are awesome and pretty fast when it comes to helping your customers. Colin
|
|
|  |
 |

ColinW-O
User
May 11, 2008, 10:23 AM
Post #6 of 8
(301 views)
Shortcut
|
|
Re: [Donna] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Sorry for bringing this old topic back, but I have a question. I'm using this feature only for the top story at the moment and I am interested in adding it for ALL my posts. I figure I could use the same drop down menu and use the same code. However is there a way to include a default image so to speak when there's no image selected from the drop down menu? I'm asking because I have over 7,000 articles and the way I set it up is if there's no image it would look really bad visually. So adding a default image if nothing is selected at least would fill the void. I ain't going to edit all the 7,000 articles obviously so having this default pic would solve the problem. I'm attaching an image to explain better how it's looking. Hope I explained myself good :) Thanks, Colin
|
|
Attachments:
|
screenshot.jpg
(79.9 KB)
|
|
|  |
 |

Jake
Staff
/ Moderator

May 12, 2008, 12:25 AM
Post #7 of 8
(279 views)
Shortcut
|
|
Re: [ColinW-O] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Hi Colin, Thanks for posting! I looked into this for you, and I worked out a method that should allow you to set a default image for articles that do not have anything selected in the drop down menu. First, you'll want to find the image tag that you have set up to work with the drop down menu on your templates. If you followed Donna's example, the code would look something like this:
<img src="/path/to/uploaded/files/$article.UploadedImage$"> Now, you'll want to replace that with this:
<!-- templateIf: $article.UploadedImage$ ne "" --> <img src="/path/to/uploaded/files/$article.UploadedImage$"> <!-- /templateIf --> <!-- templateIf: $article.UploadedImage$ eq "" --> <img src="/path/to/your/default/image.jpg"> <!-- /templateIf --> What's happening there is that each time Article Manager encounters an article that doesn't have a selection in the drop-down menu, it will use a different image tag which you have set up to point to your default image. Let us know if you have any other questions about this. ----------------------------------------------------------- Cheers, Jake Swanson - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

ColinW-O
User
May 12, 2008, 9:15 AM
Post #8 of 8
(275 views)
Shortcut
|
|
Re: [Jake] Feature for Top Story, is this possible?
[In reply to]
|
Can't Post
|
|
Thanks Jake, I'll give this a try. I was brainstorming and had another plan to load the image just in case there was no way around this but you guys always find a way! :) Thanks! Colin
|
|
|  |
|