diff --git a/components/CommunecterController.php b/components/CommunecterController.php index dd0ac323fb9576192ee656965b9998a1587c56dc..be8db7e68738830849def592e99f94cb9b9ab1fe 100755 --- a/components/CommunecterController.php +++ b/components/CommunecterController.php @@ -692,14 +692,19 @@ class CommunecterController extends Controller if( isset($_POST["costumSlug"]) ){ - //var_dump("okkkkkkkkkkkkk");exit; + //var_dump("okkkkkkkkkkkkk"); //&& @Yii::app()->session[ "costum" ][ "slug" ] != $_POST["costumSlug"] if( isset($_POST["costumId"]) && isset($_POST["costumType"]) ){ //cas d'un costum utilisé comme un template par plusieru element - Costum::init( null, $_POST["costumId"], $_POST["costumType"] ); + $el = Element::getElementById($_POST["costumId"], $_POST["costumType"]); + //regle un prob de surchagement des contextId donc on passe par le slug + if(isset($el)) + Costum::init( null, null, null,$el["slug"],null,null,null,null,"co2/components/CommunecterController.php 0" ); + else + Costum::init( null, $_POST["costumId"], $_POST["costumType"],null,null,null,"co2/components/CommunecterController.php 1" ); } else //pas d'element fourni juste un slug de costum - Costum::init( null, $_POST["costumSlug"] ); + Costum::init( null, $_POST["costumSlug"],null,null,null,null,"co2/components/CommunecterController.php 2" ); } // var_dump("outside");exit; // discussion bouboule oceatoon diff --git a/docs/process/costum.org b/docs/process/costum.org new file mode 100644 index 0000000000000000000000000000000000000000..6976badaaa4eb95a661f199f34038b62d0af446e --- /dev/null +++ b/docs/process/costum.org @@ -0,0 +1,33 @@ +always goes through +CommunecterController.php + + +main costum controler +[[~/d/modules/costum/controllers/actions/IndexAction.php]] + Costum::init + prepares all the context elements put into session + * using $test + only loads the costum json and applies it to an element + * using $id + loads the costum json + * using $slug + loads the costum json defined on the element@slug + * first Time or F5 + render "co2.views.app.welcome" using "//layouts/mainSearch"; + $this->renderPartial( Yii::app()->session["costum"]["welcomeTpl"] ); + +Costum.php:65:null +Costum.php:66:null +Costum.php:66:string 'administration-opal' (length=19) + + + * on reload using js loadByHash + api.js + mylog.log("url","costum LBH", costum.slug, contextData ); + + renderPartial "co2.views.app.welcome" + $this->renderPartial( Yii::app()->session["costum"]["welcomeTpl"] ); + +Costum.php:65:string '5c6138c240bb4e0725d5ba87' (length=24) +Costum.php:66:string 'projects' (length=8) +Costum.php:66:null diff --git a/docs/process/costumBuilder.org b/docs/process/costumBuilder.org index bf2aa7c1a527e56bf92f22263b8d59ef7dee3323..c40641a285118faf9fc50656930e18211b25d69e 100644 --- a/docs/process/costumBuilder.org +++ b/docs/process/costumBuilder.org @@ -9,7 +9,7 @@ this forces the costum slug == campagne ** save choice - [ ] sets on data of the element.costum.slug.campagne + sets on data of the element.costum.slug.campagne ** costumize the template [ ] template have the particularity of carrying a "dynForm" attribute