drupal: adding simple links to a block - drupal

im using Views to output a block, containing latest post titles - simple and working. id now like to add some text links that should be different than the "more" link you can add through the Views UI. they are basically just p-tags with a-tags inside, pointing to a url of my choice.
right now i just inserted the markup in Basic Information > Footer > Full HTML.
is this the standard way of achieving what im after?

You can write custom templates for each row in a view if you want. Have a look at views 2 theming

Theming is a good way to do it but then it adds an additional responsibility to move the theme file when you move the view from one site to the other.
The header and footer are provided so that you can add html and php code to it, so it is definitely the right way to do it or else it would not have been provided in the first place by the module developer.
Also if the urls are related to the drupal site then I would suggest you to use php mode and add the link using l function (http://api.drupal.org/api/drupal/includes--common.inc/function/l/6)

Related

how to add a function if only a certain template is being used

I'm building a site for a networking group and they want to show if a category is open for someone to join.
I'm not sure if this is possible but I need to add a style to the navigation that if a category is open it will show "open" next to it when you hover over it. I know I can change it but the problem is it needs to be user friendly so they can change it themselves. So I'm trying to figure out a way to make it as easy for them as possible.
So far I came up with the idea of creating a different page template for them to choose and created a hover style for that template. The problem is you have to be on that template page and it shows when you hover over all of them even if it's not open.
Is there a way to add a function for a page only if it's using a certain template?
Here is a link to a page that is using the template I added - http://pt6-dev.info/categories/auto-truck-repairs/
I know some of the basics of php and javascript so any help or ideas would be appreciated!
You can just add it into the PHP file out with the PHP tags using the < script > element

Drupal add link to another page in header of a block

In Drupal 7 I created a views page, and I want users to have the option to view the results either as a list, or with thumbnails (like on a lot of websites). The only way I can think of doing that is creating one page with the results as a list, and having a link to another page with the results that have thumbnails.
But my question is, how do I add just a random link to the top of my block page that will direct users to the 'thumbnail' page?
I tried to use 'unfiltered text' in the header and put the html for a link in there, and when I went to the page it looked like a link, but I couldn't click it. Any suggestions?
For every view you can create set of templates to style it. When you edit you view open "Advanced options" and then at bottom click on "Theming options" (or suggestions...can't remember real text).
That way you'll get a very useful popup which displays all templates used by view...in specific theme. So if you want to change some template just click on it's original name, pick up it's original code (copy) and create a file. Save it at your theme templates directory, pick some of suggested names, add your link or what ever html you need and clear the cache.
Templating is a bit broad subject to discuss in details for you questions's answer - find some tutorial on net, but general idea is to use custom view template and store your html there.
BTW, I hope you have only one view and different displays for you different pages.

how to change the fields added to blog in drupal 7 where I want

I am developing a website using drupal 7. I use blog module which comes as a core module in drupal 7. in the blog post I have not only added text but also a slideshow to the blog.
problem comes when I try to arrange the blog content.
I wanted to show some text message after the slideshow on left-hand side.
Normally, in drupal they render text and then slideshow(default). but I want to change it as I mentioned above.
Is there any module to handle this or can I do it another alternative way?
thanks in advance....
Try to use DS to customize node layouts
The way that will give you the most flexibility for customization would be to actually edit the template files themselves and place the individual fields' output exactly where you want in the HTML.
Check out the documentation for overriding and editing theme files, and this post for how to render individual fields into template files.

Is it possible to have a large image above the content node in Drupal?

I'm trying to replicate pages like the following using Drupal:
http://www.ams-neve.com/Products/Outboard/1073LB/1073LB.aspx
My problem is that I'd like the image at the top (which changes depending on which page you're on) to be part of the main content node, while the menu on the left is a sidebar region.
I'd like to have a 'product' content type where I can write the main copy, include linked files, etc. plus have a 'header image' which would be what appears at the top of the page.
I have the feeling that it can't be done like this because I'd essentially need bits of the node to be rendered into different blocks. If I theme the node template to wrap a div around the header image I can't figure out a way to have that moved to the top of the page and displace the left sidebar down.
Can anyone tell me if it's possible, or suggest an alternative route.
There are a lot of products so I need it to be a simple method.
The method I used was to create a Views Slideshow Block in Views. It pulled the header_image field from my node by looking at the page it was on. I put this block into the header of my page.
Anyone else looking at this should also check out Display Suite. You can do a lot of cool stuff with that.
if i'm not getting it wrong you are having problems with the default way in which drupal blocks work. Have you tried panels? It's an awesome plugin to work with drupal which let you create pages in a really flexible way.
You could have a custom field for your 'Product' content type that is an image or a text field to a URL for the header image. Just use CSS to place them where you'd like.
Alternatively, check out these links, I think they are what you are looking for.
http://drupal.org/project/headerimage
http://drupal.org/project/sections

Horizontal Wordpress-Theme How to achieve?

I wanted to create a horizontal based wp theme.
Something like this one (http://www.lena-meyer-landrut.de)
What would be the best starting point to do that?
Every menuitem(category) is a single post? A custom field? a page? Something else?
Thanks for your help.
If the content doesn't change too often, you can use pages.
But with that theme you would have to write multiple wordpress loops, this code can get quite messy.
Create a loop for each "page" that shows up on the page.
Another way...you could hard-code the design + jQuery sliding.
Then for the plain content sections you could create multiple "sidebars" and put a sidebar where each content part is...the user could then edit their own content with a text widget.
http://www.quickonlinetips.com/archives/2007/11/how-to-create-multiple-dynamic-sidebars-for-wordpress-widgets/
Custom posts are okay, but if you are writing more than 1 custom post per page/post, then it can get quite cluttered...
I think the best option for you would be to build your site based off one of the frameworks of an existing horizontal theme...
Here is the best information I found:
http://wordpress.org/support/topic/horizontal-way-for-wordpress?replies=13
Direct link to the old "horizontal way" theme for wordpress:
http://www.thehorizontalway.com/download/THW_template_0.6.zip
Here is another base theme to base your site off of:
http://wordpress.org/extend/themes/wplatformer

Resources