Jump to content

show only content records of the database?


TAMAN

Recommended Posts

i have created a database to post youtube videos and created a block for forum sidebar to show the most recent posts

but the block shows the title records only 

and i want to make it to show content records witch it is the embedded youtube videos 

someone help me to do that please? 

----

also is it possible to have only one field on the database? i seem cant delete title and i do not need it 

i only need one field to post the youtube links, i also want it to show ONLY the embedded video in the foeum block i dont want to show who posted or whatever 

any idea?

Link to comment
Share on other sites

58 minutes ago, MRniceGUY1990 said:

i have created a database to post youtube videos and created a block for forum sidebar to show the most recent posts

but the block shows the title records only 

and i want to make it to show content records witch it is the embedded youtube videos 

someone help me to do that please? 

Create a custom block. Then you can fully customize what is shown. 
Did you use the YouTube field or just a the content field with YouTube URLs pasted into it?

 

Quote

----

also is it possible to have only one field on the database? i seem cant delete title and i do not need it 

You can set the the title or content field to “not required”. Then you can leave them blank. 

However, I would suggest to use the title field and really enter a fitting title for each video, even if you not show it in the block currently. It’s what it is used for the URL and the HTML title of the record and so on. It’s just something that should be there. Every record should have a title. 

 

Link to comment
Share on other sites

50 minutes ago, opentype said:

Create a custom block. Then you can fully customize what is shown. 
Did you use the YouTube field or just a the content field with YouTube URLs pasted into it?

 

You can set the the title or content field to “not required”. Then you can leave them blank. 

However, I would suggest to use the title field and really enter a fitting title for each video, even if you not show it in the block currently. It’s what it is used for the URL and the HTML title of the record and so on. It’s just something that should be there. Every record should have a title. 

 

I will use the youtube field type for the content

would you be so kind and show me how to make the block template to show the content records only? 

this is the template of the block i created, but it shows the title field on forum sidebar and i want it to show the content records only 

{{if !empty( $records ) }}
	<h3 class='ipsWidget_title ipsType_reset'>{$title}</h3>
	{{if $orientation == 'vertical'}}
		<div class='ipsPad_half ipsWidget_inner'>
			<ul class='ipsDataList ipsDataList_reducedSpacing'>
				{{foreach $records as $record}}
					<li class='ipsDataItem'>
						<div class='ipsDataItem_icon ipsPos_top'>
							{template="userPhoto" group="global" app="core" params="$record->author(), 'tiny'"}
						</div>
						<div class='ipsDataItem_main'>
							<div class="ipsCommentCount ipsPos_right {{if ( $record->record_comments ) === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="replies_number" pluralize="$record->record_comments"}'>{expression="$record->record_comments"}</div>
							<a href="{$record->url()->setQueryString( 'do', 'getLastComment' )}" title='{lang="view_this_cmsrecord" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'content_db_lang_sl_' . $record::$customDatabaseId, FALSE ), $record->_title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$record->_title"}</a><br>
							<span class='ipsType_light ipsType_small'>{lang="byline_nodate" htmlsprintf="$record->author()->link()"} &middot; {datetime="$record->mapped('date')"}</span>
						</div>
					</li>
				{{endforeach}}
			</ul>
		</div>
	{{else}}
		<div class='ipsWidget_inner'>
			<ul class='ipsDataList'>
				{template="recordRow" group="listing" location="database" app="cms" themeClass="IPS\cms\Theme" params="null, null, $records"}
			</ul>
		</div>
	{{endif}}
{{endif}}

Thanks for replying 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...