i'm a completely new in Drupal. I'm building a website that in the home page has the typical 3 blocks on the button where you can click and go to some specific page or article.
I create that as Block and I even create that with Nodeblock, they are displayed in the right place and with the right text and images but what I can't make it work is make them be a big link, linked to their article or page, so when user will click it will be directly redirected to the main page.
Something like:
Block: discover
<div>Discover more about our last offer </div>
How can I do that?
I can't find anything close on the web...
Without seeing your site it's hard to say what the best course of action is, however I would suggest using the Views Module.
You could create a block with views and output any field as a link. In the Views UI you can set the url to link to any piece of content above it, using a token value. If you want to link to an item that is not visible, you can hide that field by selecting the "exclude from display" option in that field's settings.
You can also always use css to expand the size of the anchor tag to encompass the entire div.
Here is a tutorial:
https://www.youtube.com/watch?v=3L9JLZOb_LQ
in your block add
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.block-link').each(function(){
jQuery(this).parents('.block').slice('0,1').wrap('');
});
});
</script>
Related
I have a page on Drupal, and I need to put an embedded page that renders a 360 img, like an iframe, on a view:
I looked for it on the internet but have not found a solution. I created a tag on that view but I don't know where to put my iframe code to render it.
This is my config tag view:
I see you are using a body field in your view so I guess you'll want to add the iframe to that field?
If thats the case, you can enter the iframe code in your body and put the format on "FULL HTML", you might want to look into your WYSIWYG settings (/admin/config/content/formats in D8) to verify if the iframe tag is allowed.
There's also the option of using the iframe module (https://www.drupal.org/project/iframe) which allows you to add an iframe field.
Good luck
in my case, i create a block and i put the iframe code inside them, after i configure the block to show where i want
This is the creation block
But creating views, does not work because that don't let me modify the content
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.
I've tried deleting blocks, disabling views - the lot! I just can't get this little block to go away!
A block called "Related Forum" is showing up on our knowledge base pages an example is found - here.
I'd like the whole Related Forum block removed from any /help* page:
If I login and hover my mouse over the block, no settings icon appears.
Any idea?
Navigate to the blocks admin page at "admin/structure/block".
There somewhere you should see your block (generated from a view) named something like "View: related forums".
Click configure and change this blocks visibility settings under the "pages" tab at the bottom of the configure page.
If this does not work, check that this block is not being specifically included in a template file.
Another thing that may be affecting it is the context module.
sir
I'm new to the drupal. I want to put twitter button in my drupal 7 web site in the footer.I use twitter button code to html.tpl.php file and i put code to the below the page bottom ().It works correctly.But button it display below the footer in my site.But i want to display twitter button in the footer.How can i do this.
I want only the log to my site's twitter page when clicking button.
this is the code which i use (https://twitter.com/about/resources/buttons#follow)
Follow #twitter
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
thank you
You're best off using the Twitter Follow Block module or Follow Button module or a similar one to do this for you. They'll each give you a block which you can then place wherever you want, without having to manually add the code to your template. You can then just go to the blocks page and move it to the region you wish to place it in and order it relative to the other items in that region using the drag handles on the left.
If you really want it completely custom coded in yourtemplate, you're probably looking for page.tpl.php, not html.tpl.php. You won't have as much control over placement, though.
i'm new to drupal views. More link not displayed with my view block. i set more link both Create more link and Always display more link option too. Find picture below for view settings.
Note: i'm sure there is around 10+ nodes available to display.
You have only block display, so where should go "More"? :) Create also "Page" display.
If you have specific page to link on more then you can use header or footer also
1. Add Global Custom Text in Header or Footer
2. Put Your Link There.
That is alternate way for more link