Print the votecount & vote link sperately

tuti - November 19, 2007 - 19:20
Project:DrupalIt
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Right now the [drupalit] array in the $node object looks like this:

<?php
[drupalit] =>
    <
div id="vote-wrap-1001" class="vote-wrap">
        <
div id="vote-count-1001" class="vote-count">1</div>
        <
a href="/drupalit/count-vote/1001/1"><span id="vote-text-1001" class="vote-text">vote</span></a>

    </
div>
?>

I want to do some restructuring of the layout. It would be nice if the vote count and the vote link would be seperated. Something like this:

<?php
[drupalit] => Array
    [
vote_count] => 1,
    [
vote link] => <a href="/drupalit/count-vote/1001/1"><span id="vote-text-1001" class="vote-text">vote</span></a>,
    [
vote address] => /drupalit/count-vote/1001/1
?>

That way you would have total flexibility over the layout and can print the vote count and vote link whereever. Don't get me wrong css takes you a long way but for some things you need to restructure the XHTML also..

#1

budda - February 29, 2008 - 02:01

+1 for this

 
 

Drupal is a registered trademark of Dries Buytaert.