View Full Version : I need help with this VTE template engine.

02-12-2008, 10:26 PM
I've been tinkering with the vivvo engine for a number of hours now, but I am running close to my deadline. So If any more experienced vivvo developers can help this is what i need.

On the main page I need it to show the title , author image, name, and post date followed by the abstract of the latest article by a featured author. below I need it to display date links to 2 or 3 past articles.

I've attached a graphic representation which my designer gave me. Don't worry about layout, i just need the template engine code! Help :)

02-13-2008, 04:07 AM
Do you mean on the home page? What main page do you mean?

Also, all of these items should be in the article/default.tpl. You can reference the specific items in the developers documentation on the Vivvo site. It's a matter of rearranging the items, and manipulating your css file.

02-13-2008, 06:11 AM
Yes, I do mean on the homepage. I need the latest article from 1 featured author, as well as their name and bio. followed with this i need 2 previous articles by date at the foot of the posting. as shown.

02-13-2008, 11:26 AM
I think that the best way to do this is to create new summary template (or modify summary/default.tpl, if you want this system wide).

For author name, image and date of article, you can use this code:

<vte:box module="box_users">
<vte:param name="search_limit" value="1" />
<vte:param name="search_id" value="{article.get_user_id}" />
<div id="box_users">
<vte:foreach item = "user" from = "{user_list}">
<vte:if test="{user.picture}">
<img src="{user.get_picture_href|'summary_small'}" alt="image" />
<a href="{user.get_href}"><vte:value select="{user.get_name}" /></a>

<vte:if test="{VIVVO_ARTICLE_SHOW_DATE}">
<span class="metadata_time"><vte:value select="{article.get_created}" /></span>

Place this code somewhere inside <div class="short_holder"> block.

You can customize appearance of date/time via administration >> preferences.

As for "Past Articles" block, I'm afraid I can't help you with that, maybe it would be best to create entirely new box with parameters to get past articles for specific user.

02-13-2008, 05:49 PM
Thank you for your suggestions. I will attempt to implement this and post back if I have more problems :).

02-14-2008, 10:48 PM
Alright I figured out how to get that all working but now I am faced with a new problem.

<vte:value select="{article.author}" />
This call yeilds the author's name; however, my author name for the project includes "name" and the output is &quot;name&quot;

Is there anyway to fix this?

02-14-2008, 10:55 PM
Have you tried {article.get_author_name}?

02-14-2008, 11:03 PM
Yes, unfortunatly it yields the same result. The only thing so far that I can see is to use a "user_box" module which does interpret the username correctly with {user.get_name} or first_name, last_name..

It's something to do with how the output is generated. The &quot; should be interpreted by the browser, but it's not.

02-15-2008, 04:18 AM
So, just to be clear:

1. you're entering the word "name" in your user name field
2. When it outputs via the object, it's adding the word "name"
3. This means your final output is "name name author name?

I am a little confused. Clarification would help.