ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Image thumbnail template tag

November 08, 2011 7:14pm

Subscribe [4]
  • #1 / Nov 08, 2011 7:14pm

    pidal233

    3 posts

    This question may be related to a resolved thread.

    hi, just bouth EE2 and it looks amazing! i already had the html template and the integration with EE is really fast and easy but i have two questions.

    In one channel, the entries have a custom field of FIELD, to upload the image entry to a folder i created, and i also told EE to create a reduced image on every upload to have a smaller one when i display the entry list, but i dont know how to call it within a template!

    to see the large image i just write the tag {image} but, which is the tag for the other ones? i saw that EE creates subfolders with this images _thumb _medium etc.. but i cant access them.

    my other question is related with the EE URLS. i’ve been working with codeigniter and its a bit strange to me.

    for example if i have an entry that want to display in one template for example “restaurants/view” the url will be like this “index.php/restaurants/view/my_restaurant”,
    but i can algo access the entry going to “index.php/restaurant/myrestaurant” and this template is created to list a view not a single entry.

    how can i fix this? redirect to a 404 or to the template but without the entry name?

    im not also pretty sure on how to filter my entrys by categories. i want to have a little menu at the top of the view all template with the categories and when a user clicks one the filter.

    thank you!

    Moved to Community Help forum by Moderator

  • #2 / Nov 09, 2011 12:15pm

    Sue Crocker

    26054 posts

    Hi, pidal233.

    As of right now, there really isn’t a good way of grabbing that particular smaller image. We’re still adding functionality to EE in this regard.

    One workaround I’d use for now is to purchase CE Image, which will resize images on the fly for you. You can find it on Devot-ee.com.

    When it comes to preventing urls from showing you might want to look at enabling Strict URLs.

    Can you post what you’ve tried so far with categories?

  • #3 / Nov 09, 2011 12:28pm

    Greg Salt

    3988 posts

    This question may be related to a resolved thread.
    In one channel, the entries have a custom field of FIELD, to upload the image entry to a folder i created, and i also told EE to create a reduced image on every upload to have a smaller one when i display the entry list, but i dont know how to call it within a template!

    to see the large image i just write the tag {image} but, which is the tag for the other ones? i saw that EE creates subfolders with this images _thumb _medium etc.. but i cant access them.

    Hi pidal233,

    I have a very simple plugin available to do this. It’s on Github. There is only one parameter: ‘size’, which should be the same as the File Manager preferences alternate size. There is no documentation but it’s easy to see what it does so you should be able to modify it for your specific needs. Hope that helps.

    Cheers

    Greg

     

  • #4 / Nov 09, 2011 1:27pm

    Sue Crocker

    26054 posts

    Ohhh… thanks Greg. pidal233.. will that plugin work for you?

  • #5 / Nov 09, 2011 2:17pm

    Also, just wanted to mention that I have a plugin on Devot:ee, called CG FileInfo, that is designed to do just what you’re asking for, allowing you to access all of the file manager meta data and manipulations from a file field.

  • #6 / Nov 09, 2011 2:28pm

    Sue Crocker

    26054 posts

    Glad to hear of that one too, Jeremy. 😊 Thanks for responding!

    pidal233, looks like you have two choices.

  • #7 / Nov 09, 2011 4:24pm

    pidal233

    3 posts

    thank you! im trying to use the Greg Salt plugin but without success. i installed it but then i dont know how to make it work.

    {imagefield size="thumbs"} is not working for me, it also prints the url of the big image.

    Sue, i tried the Strict URLS but i had already activated that option, but in the support page you linked me i think i can found the answer to my problem. thank you!

    i will try with more patience the category stuff and post here my code if i cant make it run!

  • #8 / Nov 09, 2011 5:07pm

    Greg Salt

    3988 posts

    Hi pidal233,

    The plugin is to be used as a tag pair (see the EE docs for a description of how plugins work). I built it to be used for image links embedded into text fields (though it can be easily modified for other types of field). So, for example, I have a custom text field called about_body that I have added an image to somewhere within the text. My template has this on it:

    {exp:dry_image_size size="content"}
     {about_body}
    {/exp:dry_image_size}

    In this case ‘content’ is one of my resizing options in the File Manager. Does that help?

    Cheers

    Greg

    Edit: I don’t wish to hijack this support thread so it may be best to deal with this particular issue in the Community Help forums.

     

  • #9 / Nov 09, 2011 10:11pm

    Sue Crocker

    26054 posts

    No worries, Greg. 😊

    Moving to the Community Help forum…

  • #10 / Nov 12, 2011 3:18pm

    pidal233

    3 posts

    Sue, this it the code im using to show the categories.

    {exp:channel:categories channel="mychannel"}
        <a href="http://{path=mychannel}">{category_name}</a> 
    {/exp:channel:categories}

    i dont really understand why its working but its working so im happy haha.

    now i would like to change the template/C2, C3, C4 URL for the name of the category. how can i do this?

    and there is one more thing that i dont completely understand.

    when i for example write .com/index.php/mytemplate/2, while having in the index of the mytemplate group a <ul> of entries, it shows me only the one with the id of 2, but i will like to redirect the user to the complete list or to a 404 error page, but he cant see only one entry in the list.

    until having the categories filter i wrote at the top of the template if segment_2 is not empty redirect but now what? because if i filter a category the name or the id will be placed there!

    thank you!!

     

  • #11 / Nov 12, 2011 3:26pm

    pidal233

    3 posts

    thank you very much Greg Salt but i finally bought the jeremygimbel’s plugin. Im trying it right now!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases