Dedecms the solution to display the full title of the article in the list _dedecms

Source: Internet
Author: User
Workaround:

Modify the include\inc\inc_fun_spgetarclist.php file, modify the function spgetarclist, and locate the following code:

Copy Code code as follows:

$row [' typelink '] = "<a href=". $row [' Typeurl ']. "' > ". $row [' TypeName ']." </a> ";
$row [' image '] = "<]", "", $row [' title ']). "' > ";
$row [' imglink '] = "<a href=". $row [' filename ']. "' > ". $row [' image ']." </a> ";
$row [' title '] = Cn_substr ($row [' title '], $titlelen);
$row [' textlink '] = "<a href=". $row [' filename ']. "' > ". $row [' title ']." </a> ";

if ($row [' Color ']!= "] $row [' title '] =" <font color= ' ". $row [' Color ']." ' > ". $row [' title ']." </font> ";
if ($row [' Iscommend ']==5| | $row [' Iscommend ']==16] $row [' title '] = ' <b> '. $row [' title ']. " </b> ";

Modified to:

Copy Code code as follows:

$row [' typelink '] = "<a href=". $row [' Typeurl ']. "' > ". $row [' TypeName ']." </a> ";
$row [' image '] = "<]", "", $row [' title ']). "' > ";
$row [' imglink '] = "<a href=". $row [' filename ']. "' > ". $row [' image ']." </a> ";
$row [' alltitle '] = $row [' title ']; Add article title attribute support
$row [' title '] = Cn_substr ($row [' title '], $titlelen);
$row [' textlink '] = "<a href=". $row [' filename ']. "' > ". $row [' title ']." </a> ";

if ($row [' Color ']!= "] $row [' title '] =" <font color= ' ". $row [' Color ']." ' > ". $row [' title ']." </font> ";
if ($row [' Iscommend ']==5| | $row [' Iscommend ']==16] $row [' title '] = ' <b> '. $row [' title ']. " </b> ";
The code adds a

$row [' alltitle '] = $row [' title '];
Redefining an array variable holds the contents of the caption.

You can then use a label like [field:alltitle/] in the template to invoke the full title of the article.
For example:

Copy Code code as follows:

{dede:arclist typeid= ' 0 ' row= ' 6 ' titlelen=32 orderby= ' pubdate '}
<li><a href= "[Field:filename/]" title= "[field:alltitle/]" >[field:title/]</a></li>
{/dede:arclist}

That's about does it-enjoy!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.