Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get page titles with smarty

Featured Replies

I can get links to pages with the following smarty tags 

{$link->getPageLink('contact')|escape:'html':'UTF-8'}
{$link->getCategoryLink(4)|escape:'html':'UTF-8'}
{$link->getCmsLink(9)|escape:'html':'UTF-8'}

Is there a way to get page titles instead of having to use the {l s='title'} tags?

Edited by Coachonko

Solved by datakick

  • Solution

It's doable, but not very friendly. Look what static methods are available in Meta class. You could you getMetaByPage, or getCategoryMetas or getCmsMetas

{assign var='contactMeta' value=Meta::getMetaByPage('contact', $lang_id)}
{assign var='categoryMeta' value=Meta::getCategoryMetas(4, $lang_id, 'category')}
{assign var='cmsMeta' value=Meta::getCmsMetas(9, $lang_id, 'cms')}
<pre>
  contact title = {$contactMeta.title}
  category title = {$categoryMeta.meta_title}
  cms title = {$cmsMeta.meta_title}
</pre>

 

  • Author

Thanks! This can be very useful when there is a large amount of these links, dynamically getting title is much faster than editing translations.

6 hours ago, datakick said:

It's doable, but not very friendly. Look what static methods are available in Meta class. You could you getMetaByPage, or getCategoryMetas or getCmsMetas


{assign var='contactMeta' value=Meta::getMetaByPage('contact', $lang_id)}
{assign var='categoryMeta' value=Meta::getCategoryMetas(4, $lang_id, 'category')}
{assign var='cmsMeta' value=Meta::getCmsMetas(9, $lang_id, 'cms')}
<pre>
  contact title = {$contactMeta.title}
  category title = {$categoryMeta.meta_title}
  cms title = {$cmsMeta.meta_title}
</pre>

 

contactMeta works perfectly

categoryMeta works but it seems like thirty bees appends the name of the website to the title, so the output should be processed.

The cmsMeta doesn't seem to work.

If how do you fetch the name of the page instead of the meta title?

Edited by Coachonko

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.