Hi all,
I'm hoping someone could be kind enough to help with this simple question of which method to choose for my image upload scenario.
I need to:
- provide an easy way for editorial admin users to upload images per page or story, they shouldn't be exposed to HTML code. Preferably (not a must) everything would be done in the edit of the page and not require going to create content -> image.
It needs to be as simple as possible.
- The site is a simple 3 column - I need to display a single image with a 2 line of text in the right hand column - 'panel style' (region) - I'm using Zen template where it's called 'rightsidebar'.
- The image uploaded to the page has to only be displayed on that page only
I've tried:
- image upload
- uploading via the 'body' section with the text editor
The problem with those approaches was that although it provided easy upload the I can't get it to appear in the right region (it appears in the wrong 'default' region) and I don't know how to change it.
-I'm currently using views with Image to display the view as a block.
Although it doesn't allow easy upload (the Admin would have to create new Block in Views and make it appear only on chosen page) - this is not an option. This however easily let's me control the region this block appears in (controlled in Blocks).
I'm sure there must be an easy standard way of doing it - I'd appreciate someone pointing me to the right tutorial or examples. What I need is more of a pointer in 'the way of doing it' the technical 'how to' is a secondary issue.
Any help will be much appreciated,
Pav
Comments
_
One way to do it would be to add an imagefield to the content type to hold the image, then use the cck_blocks module to place that imagefield in a block. Another way would be to use the panels module.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
I've looked at Panels
They seem to be good for 'landing pages' where the image in the panel is used to promote content from elsewhere on the site. I just want a simple 'news' type of page. Where there will be many of them and the image is to appear only on that 'story' - page.
I'm looking at the CKK with imagepanels now but can't understand how it will control the display of the image per that page only. Wouldn't I have to have 'type' per each page?
Seems that creating a landing page is a lot easier in Drupal than just putting a simple page together. I'm really missing something here.
Thanks for your help.
You could use CCK plus the
You could use CCK plus the image field to add an image field to the content type(s). I would also suggest using image cache.
The image field allows for a description so you could use that for the text.
The use CCK Blocks to make show a block for your new image field.
Still can't figure it out :(
I've used Views to create a block (as mentioned above). The problem is that I don't understand how I could then show the image per that page only? In my set up I'd have to create a separate block (in Views) to add new picture - that's what my problem is.
If I do it as you said with CKK and imagefield how do I control where the image appears?
I'm missing something fundamental here. I'm failing to find a tutorial on what it need. This is what I'm trying to do now after your advise
http://drupal.org/node/144725
But it seems that it's very similar to what I already have and that I would have to clone the view for each page? This seems an overkill for a simple picture upload - just to make it appear in another column.
How could I just make the picture uploaded with file upload, added in 'content type' as an extra field appear in a different column?
The scenario I want to achieve is this:
Admin comes to create a news page - enters the text in the body, uploads a picture with a line of text. The main body text appears in the center column and the picture shows in a 'panel' in the right column with the line of text.
Many thanks for you help.
Pav
It can certainly be done with
It can certainly be done with views, though you have to play with arguments in order to get the side content to recognize its relationship to the main content.
cck_block does that hard bit for you.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
This seems to be a good way of doing it
I was looking at it so thanks for posting this. I still can't figure this relationship setting to make the image appear only on that page though. Will keep looking.
So far I tried those relationships but not much luck:
Image: File
Content: Image_custom - fid
(Image file) Image: Node
Thanks for now,
Pav
Don't need relationships.
Don't need relationships. arguments
Your view,
displays the attached image(s)
And has an argument
"the node id"
Then placing that view-block on a page that is a node - will get the node id from the URL context, and figure out what to show.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Summary on how I've achieved the solution
I’m a newbie but thought I’d summarise how I achieved result with this issue – thanks to all the above Dan, WorldFallz, nevets:
Creating simple way of uploading images and displaying them in a block. Doing it this way I can gain easy control of placing the image in a block and therefore in chosen region.
This is how I did it with ImageField, and CKK_Block module.
Created content type – ‘News’ and added a field – Image.
CKK_block auto creates block (you can achieve it with just Views I think but it seems a lot harder) CKK_block handles all difficult stuff here, I then had to go to ‘News’ – my new content type – and configure ‘Display fields->CKK Blocks-Image’ to display images.
The rest is just going to Blocks and adding it to the right region.
For reasons that Dan briefly mentioned above the image only shows on the page it was uploaded on.
Many thanks everyone and if any newbie has any questions to do with this please ask. Equally if you think there is something really wrong with this setup please let me know.
Pav
Great job...
But I'm a noob and have a few questions. I have gotten the image to be uploaded which is great. My issue is placing it where I want it. I have created the field but I can't get it to appear above the text, which is where I want it. I guess my question is how do you manage the block where the image should go?
~Corey
---------------------------------------------------------------------------------------
Very new to Drupal... But I'm making progress!
CKK_block
I'm not sure if you are asking about how to place the image anywhere or just make it appear together with the text underneath?
Placing the image in the chosen region:
Are you using CKK_block? If so if you follow the steps above the block should appear in your Site Building ->Blocks choose the region where you want it.
Making the image appear above the text:
I'm sure there are more elegant ways of doing this (please share them with us) but how I did it was simply created another block (and placed it underneath the image block).
1. Create a text field underneath you picture field (e.g. Image_field_text)
2. Add the block Image_field_text
3. Finish it off with styles.
Hope this helps,
Pav
thanks Pav, We ended up using
thanks Pav,
We ended up using one of those templates from the CCK editor. We uploaded the image to the site using "image attach" unchecked it from showing up on the site, used the images link as the hyperlink for the image space on the CCK editor and then put the text all around it!
Might not be the best way but it gives us the effect we wanted!
~Corey
---------------------------------------------------------------------------------------
Very new to Drupal... But I'm making progress!