This forum is for assistance with theme development.

how do you display a linking freeform list?

Trying to figure out how to display a freeform list with links corresponding to each line (or CSV).
We've been talking about it on http://drupal.org/node/14466 .

Drupal is doing it, so why can't we? ... using phptemplate, successfully overriding the user profile template...

Here's what's been tried, note that profile_employer and profile_profession are both names of profile fields specified in the user/profiles admin area, as freeform lists -

<?php if($user->profile_employer): ?>
<div class="user_employer">
<a href="/profile/profile_employer/<?php print $user->profile_employer ?>"><?php print $user->profile_employer ?></a>
<?php endif; ?>

(this creates a link that includes all of the contents into one big link)

<?php if ($user->profile_profession !=""):?>
<div class="user_profession">
<? print $user->profile_profession ?>
<ul>
<?php foreach ($user->profile_profession as $profession_link):?>
<li><a href="/profile/profile_profession/<? print $profession_link ?>" title="title here"><? print $profession_link ?></a></li>
<?php endforeach ?>
</ul>
</div>
<?php endif ?>

(the first print inside the if statement here was for debugging purposes, it works, just outputs the text, on one line)

$count_total = count($user->profile_profession);
for ($counter=0; $counter<$count_total; $counter++)
{
$line = each ($user->profile_profession);
<li><a href="/profile/profile_profession/<? print $line ?>" title="title here"><? print $line ?></a></li>";
}

(this was modified a little to either print the list item line or to contain it within for /endfor, nothing worked)

I've been working on this for a few days now and I'm a bit confused. There have been two errors reported in the site log,

warning: Invalid argument supplied for foreach() in /"my account path"/public_html/themes/griffin_phptemplate/user_profile.tpl.php on line 22.

(for the foreach statement try)

warning: Variable passed to each() is not an array or object in /"my path"/public_html/themes/griffin_phptemplate/user_profile.tpl.php on line 22.

(for the each statement try)

Formatting guidelines

I'd like to hide the formatting guidelines when posting. I'd like to keep only the link saying "Formatting guidelines". Which template shall I edit? I'm using phptemplate. Thanks!

Buttons on Kubrick theme

Hi folks,

I'm using the great Kubrick theme on my site right now The Green Room and would like to make the menu bar over the mast head into buttons instead of just plain text. Is there any easy way of doing this?

All help greatly appreciated.

FrancisQ

Different template markup depending on page view?

I am working on a theme where I need to add an extra div to the following page views:

  • /node/add ...etc/etc
  • /user .../etc/etc
  • /admin .../etc/etc

But I don't want the div on any other views, for instance I don't want the div on

Just a little Messing Around with Comments

I messed around with the Comments xtemplate today in an attempt to make Drupal look a little more like the phpBB2 board my users are accustomed to.

http://lacus.myftp.org/~xtech/drupal_kindof_phpbbish.png

It's not perfect, nor is it even unique or interesting. In fact, it's a pretty horrible hack that uses tables instead of real CSS. I just wanted to post it to show that, yes, your forum can be changed so it looks like those other forum systems.

Can the title be ouput below edit tabs?

I am trying to create a theme using box_cleanslate as a starting point.

In a page that lists multiple nodes (example: /node), every node is output in its own <div class="node"> which contains the title and content. This enables me to display each node in a box.

But when I click to view a node by itself (example: /node/9), there is no <div class="node"> anymore and the headline is output above the edit tabs.

No matter what I try, I can't get the title to output below the edit tabs.

Pages

Subscribe with RSS Subscribe to RSS - Theme development