Probably (and hopefully) really simple but I am having problems generating the "correct" individual {title} and {$metadescription} tags to work in the Company Directory module.
As with the News and CGBlog modules, I have the code below included in my Detail templates.
{assign var='alt_title' value=$entry->title}
{assign var='metadescription' value=$entry->content|truncate:'250'|strip_tags|strip}
This produces my assigned <title> and metadescription tags for each entry in News and CGBlog, but doesn't in Company Directory.
Any help appreciated.
Thanks,
Paul
Sytem info below
Cms Version: 1.11.11
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.7
ModuleManager: 1.5.8
News: 2.14.4
Search: 1.7.11
ThemeManager: 1.1.8
CGExtensions: 1.42.2
CGSimpleSmarty: 1.7.4
JQueryTools: 1.2.6
CompanyDirectory: 1.22.5
CGBlog: 1.12.6
CGSmartImage: 1.17
CMSForms: 1.10.10
ListIt2: 1.4.1
CGGoogleMaps2: 0.99
Postcode: 1.2.1
TinyMCE: 2.9.12
GBFilePicker: 1.3.3
FormBuilder: 0.7.4
CMSDumper: 1.3
ImageCompressor: 0.10.1
MetaMax: 2.1.1
ListIt2Recipes: 1.4
ListIt2Products: 1.4
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 50000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.5.11
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 50M
upload_max_filesize: 50M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
<solved> {$alt_title} in Company Directory module
<solved> {$alt_title} in Company Directory module
Last edited by pwg on Mon Oct 27, 2014 11:11 am, edited 1 time in total.
Re: {$alt_title} in Company Directory module
I think there are no fields named 'title' and 'content' available by default in this module.
Include a statement in the template to print the available fields.
Include a
Code: Select all
<pre>{$entry|print_r}</pre><solved>Re: {$alt_title} in Company Directory module
Fantastic, and you're absolutely right.
What I assumed was title, is actually is field labelled "company_name" so tag should be {assign var='alt_title' value=$entry->company_name}, worked immediately.
Thank you so much, velden.
What I assumed was title, is actually is field labelled "company_name" so tag should be {assign var='alt_title' value=$entry->company_name}, worked immediately.
Thank you so much, velden.


