[SOLVED] CGSimpleSmarty fetch and eval content + append

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

[SOLVED] CGSimpleSmarty fetch and eval content + append

Post by rotezecke »

i'm trying to fetch a content block from some other page like this:

Code: Select all

{cgsimple::get_page_content('gc-photo-gallery','','foo')}{eval var=$foo}
which works fine, however, that content includes a {UDT} which amoungst other things does:

Code: Select all

$smarty->append('readyJS','<__script__ type="text/javascript">
    $(document).ready(function() {     
       $("ul#'.$galleryID.'").tabs(">div.image_pane", {
        rotate: '.$rotate.'
        }).slideshow({clickable:'.$clickable.', autoplay: '.$autoplay.', interval: '.$interval.' })
    });
</__script>');
the readyJS array is part of all my templates to inject JS at the bottom of the templates. however, when fetching content like this, it does not work.

am i missing something, or is it not possible to append that way? Thanks.


----------------------------------------------

Cms Version: 1.11.11

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.6
News: 2.14.4
CGSmartImage: 1.16.2
Search: 1.7.11
TinyMCE: 2.9.12
CGSimpleSmarty: 1.7.4
CGExtensions: 1.41.2
CGBlog: 1.12.6
CGFeedback: 1.6.5
Captcha: 0.4.6
FormBuilder: 0.7.3
Showtime: 3.4
JQueryTools: 1.2.6
GBFilePicker: 1.3.3


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
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.4.31-1~dotdeb.1
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.6.19
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found


----------------------------------------------
Last edited by rotezecke on Thu Sep 11, 2014 9:43 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CGSimpleSmarty fetch and eval content that includes appe

Post by Rolf »

Try to set a space between } and ) in the UDT
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: CGSimpleSmarty fetch and eval content that includes appe

Post by rotezecke »

i had already opted for a GCB instead of the {cgsimple} but after your response i copied the previously posted code back into the content block and it now works (without adjusting spaces in UDT).
i'm puzzled. Thanks for your help.
Post Reply

Return to “Modules/Add-Ons”