Yii Framework Forum: Example on using Clips - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Example on using Clips Rate Topic: -----

#1 User is offline   mrlami 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 03-March 09

Posted 26 April 2009 - 02:12 PM

I am trying to archive something similar to what masterpages allows for with yii.

That is, I want a layout that defines placeholders where anything can go into (not just common content). So for example I can have pageA show widgetA in a placeholder section, and pageC show widgetB in the same section as oppose to them showing the same content.

I have read from the forums that Clips are the way to go if I want to do this, but there are no examples of how this can be archieved
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,875
  • Joined: 04-October 08
  • Location:DC, USA

Posted 26 April 2009 - 02:40 PM

In the action view, you can have:


Then in your layout, you can insert the clip content by using:

0

#3 User is offline   mrlami 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 25
  • Joined: 03-March 09

Posted 28 April 2009 - 04:47 PM

Still a bit confused Quaing and I'm sure it's due to my Prado oriented way of thinking.

Say I have below modules
1. tag cloud module
2. donate module

On page A I want to show #1, on pageB I want to show #2.
After I have defined <?php echo @this->clips['xyz'] ?> in my layout, how do I insert any one of these modules inside the clip?

0

#4 User is offline   PRWilly 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 22-April 09
  • Location:Altoona, Pennsylvania, USA

Posted 01 May 2009 - 11:20 AM

I'm having an issue with the clips.

Then I call a widget I created that wraps things up in an html 3x3 table with the center cell with the content:


When I make this call to this class:
RailRoadwindow.php
--------------------------------------------

-----------------------------------------------------
railRoadwindow.php:

-----------------------------------------------
The javascript that jui uses, and I've found for CHtml::dropDownList with an ajax ( i don't have that code)
places link and script tags BEFORE the DOCTYPE example:
----------------------------------

--------------------------------------
What am I doing wrong do I have to scriptFile all the scripts first? 
below is the requirements checker for the box it's installed on:
This causes the text "<##head##> to appear before the title tag and

</script>

at the end of the html
-----------------------------------------
PHP version  Passed  Yii Framework  PHP 5.1.0 or higher is required.
$_SERVER variable Passed Yii Framework
Reflection extension Passed Yii Framework
PCRE extension Passed Yii Framework
SPL extension Passed Yii Framework
DOM extension Passed CWsdlGenerator
PDO extension Passed All DB-related classes
PDO SQLite extension Failed All DB-related classes This is required if you are using SQLite database.
PDO MySQL extension Passed All DB-related classes This is required if you are using MySQL database.
PDO PostgreSQL extension Failed All DB-related classes This is required if you are using PostgreSQL database.
Memcache extension Failed CMemCache
APC extension Failed CApcCache
Mcrypt extension Passed CSecurityManager This is required by encrypt and decrypt methods.
SOAP extension Failed CWebService, CWebServiceAction
GD extension Passed CCaptchaAction  
-----------------------
I am thoroughly stumped and expect it may be the version of PHP.
locally I'm on 5.2.8 , but the remote server that's failing is at 5.1.2

Any help is appreciated.

Thank you
0

#5 User is offline   ignition25 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 25-November 10

Posted 21 February 2011 - 08:50 PM

Can someone explain a use case for using clips? especially vs. say, a generic widget?

Say, for example, I wanted to use a partial view that renders CListView inside a CTabView. Would this be a proper use of clips?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users