LAyout for cnt5.article.inc.php / Link List

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Marcel
Posts: 80
Joined: Sat 8. Jan 2005, 13:07

LAyout for cnt5.article.inc.php / Link List

Post by Marcel »

Hi

I would like to change the layout for this content type and apply a special div-class to it's title/headline. I found this code in cnt5.article.inc.php

Code: Select all

//link list

$CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]);
$link  = explode("\n", $crow["acontent_text"]);
but I can't find out where to apply the div style to the content part's title.

Can anyone help? Thanks
Marcel
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

KH_link_liste

Post by flip-flop »

Hi Marcel,

that is the same for all cp´s without an own template.
Please have a look into the generated source:
-------------------------------------
<div class="content_head_before"><h3>link list title</h3></div><div class="content_subhead_before"><h4>link list subtitle</h4></div><table border="0"..........
-------------------------------------

You can change it on this way without a hack:
Insert an html cp before and behind the cp link liste:
-------------------------------------
Before -> CP html: <div class="mylinklist">
Middle -> CP link liste
Behind -> CP html: </div>
-------------------------------------

class:
-------------------------------------
.mylinklist .content_head_before h3 {.........} /* title */
.mylinklist .content_subhead_before h4 {........} /* subtitle */
.mylinklist {......} /* text */
-------------------------------------

New output:
-------------------------------------
<div class="mylinklist">
<div class="content_head_before"><h3>link list title</h3></div><div class="content_subhead_before"><h4>link list subtitle</h4></div><table border="0"..........
</div>
-------------------------------------


If you would like to have it user-friendly then provide a custom content block and put the class call into it.

E.g. custom content block {LINK_LIST}
--------------------------------------
<div class="mylinklist">
{LINK_LIST}
</div>
-------------------------------------

Template main:
--------------------------------------
............
{CONTENT}{LINK_LIST}
............
-------------------------------------

I havent test it, but I hope it will work.


One hint, at this moment V1.2.5-1.2.9 we have a problem with a generated printpage and custom content blocks if they are blank.
Workaround: Please insert this snippet into /frontend_render/ and call it e.g. hide_ccb_print.php

For one CCB:

Code: Select all

<?php
/* -------------------------------------------------------
* Workaround: Print blank Custom Content Block - Folder: frontend_render
* http://www.phpwcms.de/forum/viewtopic.php?p=78628#78628
* ------------------------------------------------------ */
$content['all'] = str_replace('{MY_BLOCK}', '', $content['all']);
?>
For more than one CCB:

Code: Select all

<?php
/* -------------------------------------------------------
* Workaround: Print blank Custom Content Block
* Folder: frontend_render
* Hide an blank CCP RT from the print output
* http://www.phpwcms.de/forum/viewtopic.php?p=78628#78628
* http://www.phpwcms.de/forum/viewtopic.php?p=80594#80594
* ------------------------------------------------------ */

$myCCB = array("{BOX_01}", "{BOX_02}", "{BOX_03}");
$content['all'] = str_replace($myCCB, '', $content['all']);
?>
Do you recognize the grate possibilities of the custom content blocks? :D

Regards Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply