Drupal 7 Views - Node Content Not Appearing - drupal

I have an issue in Drupal with getting node content to display itself. I suspect it could have to with the CSS styling, although I'm not 100% sure what's causing the issue.
Background:
So basically I'm trying to setup a blog but I'm running into serious issues trying to simply get the blog posts to display themselves.
I created a custom Drupal 7 theme using the export function of Artisteer (http://www.artisteer.com/?p=overview). A stylesheet called style.css was generated. I put some of my own CSS into this stylesheet along with the parts that were auto-generated. I should mention I did some amount of custom CSS to force the homepage to look the way I wanted.
I followed the instructions from the PDF at (http://learnbythedrop.com/buildingyourblog) to create a blog (great easy-to-follow guide). The most relevant pages for Views are pages 34 - 36, where he takes you through how to create a "Blog Post" view, in order to display your blog content correctly. However, when I got to the point where he created sample blog content and it displayed it's title and main content, this simply didn't work for me. See this link for example (Sample content that I created for testing purposes):
(http://www.productworld.com/blog-posts/2012/06/08/hello)
I can see a list of titles for sample content that I created (under the Recent Posts block), but I can't view any content from the individual blog posts themselves. The page is just blank.
Also, I can't see a list of the titles and teaser links - it should show up under (http://www.productworld.com/blog-posts) but that URL gives me a "page not found" error. This was something that worked in a previous iteration but now does not work.
Here are 2 screenshots of my View settings, in case it's relevant:
http://i.imgur.com/uadew.png
http://i.imgur.com/9yOUk.png
Questions:
What is the likely cause of the blog content not displaying? (If I do a preview of the blog post within the Views section I can see the blog content just fine, it just won't display on the actual page.) Is it styling? Some setting in Views? Some Block setting? I've searched my style.css file and tried commenting out everything to do with "content:hidden" and "display:none" to no avail. I've tried every combination of settings in the blog posts View to no avail. I've tried placing "Main Page Content" and "View: Blog Posts" blocks in various regions, and changing around the settings that restrict where the block can be displayed. The blog post title/body content doesn't show up in the page source at all, which could be a clue. How would I go about debugging such a problem?
Why is www.productworld.com/blog-posts saying "page not found", even though I've specifically set up a view to create a page at this URL? And why does www.productworld.com/blog-posts/2012/06/14/hello-world-3 show up as a valid page, when it contains "blog-posts" in it's URL?
Any help would be greatly appreciated. If I should display stuff to do with my stylesheet please let me know.

To me it looks as if you have panels overriding the Node template. Which is why your node is not being displayed properly.
Go to Structure > Panels and see if the Node Template option under Manage pages is enabled. If it is, that's probably your issue. You can tell if it's enabled by looking to the right of the text to see whether it says enable or edit.
You can then edit that setting and then edit the content and choose Node > Body to get the body of the blog post to show correctly.
Take a look at this intro video to panels if you aren't familiar with it. http://yadadrop.com/drupal-video/panels-3-overview

Take the leading '/' character out of your page path for the view - internal Drupal paths should generally never have that, but the system will prepend the configured base path to paths on your behalf (and it is probably already a '/').

Related

Wordpress how to link a page to blog content

This may seem novice, but I assure its not.
So, I have a site, which displays blog posts by date from new backwards.
Standard stuff. However, what I'm trying to do is create a temporary homepage, lets call it 'yogo'. It displays some ad, or image, with a button link.
What I'd like is a direct link to the actual blog feed which displays in a given theme site's frontpage. Is it just a block?
When Im in Appearance->Reading, I can change homepage to 'yogo' fine. But, say a visitor is on 'yogo', and I want a button they click on to link to what would be the original theme frontpage with blog content, it should technically be 'Home' but is that coded somewhere through the wordpress software like the Reading mentioned above.
Maybe Im missing something, should I shut off permalinks, and dig for it in actual page extension?
Im trying to avoid using Guten. or Elem. to build out a blog page.
Any advice, thanks in advance.
Once add your code in front-page.php or home.php you can use get_the_permalink() function to get the blog page URL and will pass in "a" HTML tag like this -
Your Blog Name
Might be it can help you.
Just a quick update. actually solved this.. In simple terms, it is possible to do this really quickly through the Wpress UI. From your backend, these are the steps in the following order:
(firstly. shout out 2 user 'mirchev' because if u didn't point out templates I would of been way off. actually after about an hour of research after that) So it all takes place in Setting->Reading. From what I've read, Wpress started off as a blog based system anyways, so it was solved a long time back. Basically to start, 1. Create 2 pages, no need to add any content as long as they are 'new' and you make note of the names.
2. Also important -in the template area to the right panel when the new page editor loads up (you don't need to add any texts, images or whatever, including the area on the right just make sure "default template" is selected. 3. Afterwards, these 2 pages are 2 be used in the Setting->reading section.
What you want to do is when you enter this setting of your Wpress site, instead of having your "homepage" radio button be "latest posts" set it to 'static page,' and 4. important - select 1 of the 2 new pages you created as the static page. 5. Now, also important, for the posts page, select the 2nd of the 2 new pages you created. 6. Once this is done, what happens is your website loads the static page, which you may customize however, and then you can go into your Appearance->menus and add the appropriate link to the 2nd of the 2 new pages you created to load the blog, or link to it whichever way you choose. More often than not a menu item should appear if that is the setting you customized.
..And that is all. if fact I was very surprised just how smooth it was.
good luck ! ..--'''~~**
Separation!

Wordpress - how to edit homepage

I've just had a website converted for me to Wordpress but the guy who did it has now disappeared!
I just need to get started with it but have hit some major obstacles. My home page is a series of blocks with images and text that respond very nicely to different devices. Trouble is when I go to Pages then Home, I'm faced with a completely blank edit box. Two hours of searching to find where these blocks are and how to edit them has failed.
Any help please!
Open up your theme customizer and at the very bottom you can chose a static front page. Here's where you settle this.
Go to Pages in the panel. Open that specific page "Home" and look which template who has been chosen for this page. Perhaps you'll find the right template.
However, it could be hard coded directly in the doc/file itself. Open up your text editor and search for a template i.e home.php or frontpage.php or something similar. Open up in text editor to see.
After another few hours of trial and error, the front page text is in a few places! Some of it is in posts, specifically the "blocks" containing text and images in paragraphs. Other parts can be found by going to Appearance | Editor then choosing Static Front Page. I've yet to find out exactly how these are made to appear on the Home page but I guess I'll get there with experimentation.

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.

Drupal Block display not showing on a module page

I have successfully created content types for certain pages which I have in Drupal. I have also successfully created menus for those content types, so when a user is on a certain type, for instance, Blog Article, they are presented with a certain menu. The problem is when I few all the blog articles the menu is there, but when when I few the /blog page which shows all the blog entries, the content block is gone.
I've set it up so the block will only be shown with certain content types, but there doesn't seem to be a content type of blog module in general. Is there a way around this? It is the same for the forum page. It will show for forum topics, but not for the actual forum.
I hope I've made my self clear, as it is quite hard to explain.
I do not know what version of Drupal you are using but I will try to help.
As per docs on drupal.org:
Configuring a block
Go to the Blocks overview page (Administration > Site Building > Blocks) to configure the blocks on your site. This page allows you to
drag-and-drop blocks into different regions as well as reorder the
blocks within a region.
Next to each block you can click "Configure" to change the specific block settings: Block title: Allows you to override the default title
for the block User, Role, and Page specific visibility: Adjust
visibility for block based on user, role or page. Additional settings
may also be available, depending on the particular block.
Note that blocks are configured per theme. If you change the theme or
enable multiple themes, you will need to configure blocks per theme.
Yeah. I may of messed the formatting a bit but basically, in step 2, you want to configure your block visibility by page specific visibility. It looks something like below:
Basically, I think in your case you could use that to show the blocks containing your menus on specific pages and add whatever paths you want your menu to show on.
Hope that helps! Happy coding
I figured it out. Instead of trying to display a block based on the content type you have to change it so it is displayed based on the URL. The reason for this is because the blog module which comes with Drupal 7 doesn't have a content type, so when a user arrives at http://www.example.com/blog there is no content type and throws all the blocks restricted by content type out the window.
To get around it I had to install a plugin called Pathauto. This plugin allows you to specify a default URL for a content type. Be sure to install this plugin first before creating any content as any previous URLs will not work, so you will have to manually go back and change the URL alias.
Once you have installed the Pathauto plugin go and setup your paths for content types. I set it up so anything which is a derivative of the content type "Blog Entry" is given the URL /blog/post-name
Now all you have to do to set the block is go to the block and click configure. In the section Pages make sure you select "Only the listed pages". You'll have to type two lines. blog and blog/*
Now that you have set this any new content which is created as Blog Entry will fall under this URL expression and the block will be shown.
Works like a dream now. What a headache to get working.

RSS <link> tag not appearing in <head> of Drupal view page display output

I have a Drupal 6 site with a view that has a page and a feed display. Both the page and the feed work great. The view just shows content type Story in reverse chronological order- basic blog listing page.
While the RSS look good, the page display doesn't include the tag in the header for auto-discovery. I've outputting $head in my page.tpl.php, so it should be there. Also, I noticed the $feed_icons variable is empty.
Any ideas?
In Drupal 6 this is no longer automatic.
Edit the view and under "Feed Settings" set "Attach to" to the page that you want to autodiscover the feed.
This should happen automatically in most cases. If you are doing something a little strange you may need to use drupal_add_feed() to add the feed to the page

Resources