0

I would like to add a "like" icon at the end of articles. It’s just an icon which allow the reader of the article to click on the icon and increment a counter. It’s not a social button.

For now, i can add this icon directly in page.tpl

<?php print render($page['content']); ?>

<p class="like-article-container"><span class="like-article"><span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span></span></p>

It works but i was wondering if it was possible to add it directly in the content type "article" in admin without modifying the file.tpl

1

You can modify it in a preprocess_page_hook, in template.php file... but I would recommend you to stick with the tpl file approach, as you've done it there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.