Blog(including commenting) Tutorial

Post here is you are having problems with any of the tutorials.
Post Reply
tiaz1988
Posts: 15
Joined: Mon Nov 09, 2015 2:30 am

Blog(including commenting) Tutorial

Post by tiaz1988 »

Hello
I have a thought.
If I have made a product blog using the Blog (including commenting) tutorial.
on blogread.php hand I have done a submenu with these links

"Product Info", "Documents" and "Reviews and Testimonials".

In the "Reviews and Testimonials" Have I looped all comments etc.
What I want Government Relations and how to do, is to "Documents" section, I have a bruksanvisnings link to be able to download.
But when I put bruksanvisnigen in blogread.php, then the same file to each product posts. How should I do to be able to add different instructions for each product? So that the correct instructions for each product under the "Documents" link.

Would be nice if someone would help me and explain how to go about it.

Thanks in advance!

// Tiaz
tiaz1988
Posts: 15
Joined: Mon Nov 09, 2015 2:30 am

Re: Blog(including commenting) Tutorial

Post by tiaz1988 »

For example, I have created a div in the document read.php blog.
In the div, I have done a text "Here you can download the manual" like this:

[syntax=xhtml]div id="document">

<p>
<span class="documentInfo">Here you can download the manual. Klicka på pdf ikonen nedan.</span>
</p>

<p>
Here, the file will be. But I can't attach the file in blogread.php.
Of course will the same file appear in each product post.
</p>

</div> <!-- END DOCUMENT DIV -->[/syntax]

I want to insert just the manual for this product. Depending on the product you have clicked on. My problem is how I get the various manuals for the specific product posts?

I hope this will explain a bit better what I mean.

Thanks!
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Blog(including commenting) Tutorial

Post by jacek »

Do you have the products stored in a database or as static pages?

You'd need to store the link to the product document in the database and output it to the page here instead of setting a fixed value
Image
tiaz1988
Posts: 15
Joined: Mon Nov 09, 2015 2:30 am

Re: Blog(including commenting) Tutorial

Post by tiaz1988 »

jacek wrote:Do you have the products stored in a database or as static pages?

You'd need to store the link to the product document in the database and output it to the page here instead of setting a fixed value
Ok, I see. So I need to insert the document I want people be able to download in the database first?

Then make a function that contains a query string that displays the link for each post id?

The products is stored in the database when I created this project, I have followed your blog tutorial. So each product is as blog posts so they are stored in the database, but I have not done so to guide the document is stored in the database. Should I do so that the document is stored in the database?

Take care!
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Blog(including commenting) Tutorial

Post by jacek »

You're in the right direction. I can't quire remember how the blog tutorial goes but if I remember rightly there is a column for the title and one for the content?

Essentially you need to add a new column to the table to store a link to the product document so you can use that on the page.

I guess alternatively you could put the link as HTML in the post body
Image
Post Reply