
MalaK_3araby
User
Sep 19, 2002, 5:47 PM
Post #1 of 21
(13892 views)
Shortcut
|
|
[ADDON] Related Articles
|
Can't Post
|
|
Adding a Related Articles Link/Button. This is done using search.cgi and a custom (text or pulldown) field. We can use a text field for the writer to type the appropriate keywords (not tested but should work), OR we can predfine the various keywords in a dropdown menu for the writer to choose from (tested and works). Setup Instructions: 1- Login to your Admin area and go to Setup Options 2- pick a spare field (i.e: art_field3) to use and Enable it. 2.1- If you want to use pulldown field type, then in the field name type your keyword options, i.e: code: Keywords (,keywords set 1,keywords set 2,keywords set 3,keywords set 4) and Save. 2.2- Or you can use field type textfield if you want your writers to type in the keywords for thier articles, in which case just type Keywords in the field name .. and Save. 3- Open your Article template file in your editor and descide where you want to add the Related Articles button and paste this: code: <form action="$url_search$" method="post"> <input type="HIDDEN" name="keyword" VALUE="$art_field3$"> <input type="submit" value="Related Articles" STYLE="font-size: 8pt; font-family: Arial; color: #0000CC; background-color: #FFFFFF; border-style: solid; border-color: #FFFFFF; padding: 0; background-position: right 50%"> </form> Save and Upload, then Publish All pages. Note: the button face is formatted to look flat on a white background, change the button style if you need to. DONE. Image is attached to see what it looks like. comments? modifications? suggestions? Enjoy. Notes for ITools staff: I tried to avoid using a spare field and tried to use the summary field to base the search on but it did not work .. i mean i get no result unless the summaries are identical in artciles, which is never the case. This is what i did: Using the summary field Open your Article template file in your editor and descide where you want to add the Related Articles button and paste this: code: <form action="$url_search$" method="post"> <input type="HIDDEN" name="keyword" VALUE="$art_summary$"> <input type="submit" value="Related Articles" STYLE="font-size: 8pt; font-family: Arial; color: #0000CC; background-color: #FFFFFF; border-style: solid; border-color: #FFFFFF; padding: 0; background-position: right 50%"> </form> Now Save and Upload, then Publish All pages. -------------- Sure you can spell it, but do you get it?
|