close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Blog Read More Link

Thread began 12/19/2012 4:48 pm by neil444064 | Last modified 12/21/2012 12:11 pm by neil444064 | 836 views | 6 replies |

neil444064

Blog Read More Link

Hello, How can I add a "read more" button after abt 200 characters in my blog articles ? So the articles are displayed from database in a repeated table and then the read more should go to full article. (Standard blog thing). Thanks in advance.

Sign in to reply to this post

Jason ByrnesWebAssist

this is a standard master detail page set.

the master page is a listing of the blog articles, the listing contains a link to the details page that passes the ID as a querystring. the details page shows the full blog by querying the database using the ID in the URL.

there are many tutorial on the web for creating a master detail page set, here is one i found through google:

watch?v=fMeYvddyUGs


you could also use the Data Bride Data Assist pages wizard to crate the results and details pages for you.

Sign in to reply to this post

neil444064

very helpful video, but I still have no idea how to add the read more link after a certain amt of characters. Can you help further?

Sign in to reply to this post

Jason ByrnesWebAssist

the view more link passes the record ID as a URL variable to the detail page.

on the detail page, you create a recordset and filter the ID column using the URL variable to return the record that coresponds to the link.


You can use the data assist wizard to create a results and details page set rather than create them manually.

Sign in to reply to this post

neil444064

I want the read more link in the master page where all the articles are listed. I get the records from the db but the full article shows. I only want the first few lined to show and then the read more link. Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

on the results page, use substr() to shorten the length to the desired number of characters, for example, this would return the first 150 characters:


php:
<?php echo substr(($row_YourRecordset['your_db_column']),0,150); ?>




you can also use this code after it to show ellipses if the string is longer:

php:
<?php if(strlen($row_YourRecordset['your_db_column']) > 150) echo "... "?>
Sign in to reply to this post

neil444064

Thanks very much Jason.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...